Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Lightweight Bartering Grid
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## lbg.protocol.data
Class MetaGridData

    java.lang.Object
      lbg.protocol.data.MetaGridData

All Implemented Interfaces:
  java.io.Serializable, java.lang.Comparable<MetaGridData>

    public class MetaGridData

extends java.lang.Object
implements java.lang.Comparable<MetaGridData>, java.io.Serializable

Author:
  Cyril Briquet
See Also:
  Serialized Form

Field Summary
`GridData[]` | `grid_data`
`java.lang.String` | `id`
`long` | `size`

Constructor Summary
`MetaGridData(java.lang.String id, long size, GridData[] grid_data)`

Method Summary
`int` | `compareTo(MetaGridData other)` Note: this class has a natural ordering that is inconsistent with equals.
`boolean` | `equals(java.lang.Object obj)`
`int` | `hashCode()`
`java.lang.String` | `toString()`

Methods inherited from class java.lang.Object
`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

Field Detail

### id

    public final java.lang.String id

### size

    public final long size

### grid_data

    public final GridData[] grid_data

Constructor Detail

### MetaGridData

    public MetaGridData(java.lang.String id,
                        long size,
                        GridData[] grid_data)
                 throws GridException

Throws:
  `GridException`

Method Detail

### toString

    public java.lang.String toString()

  Overrides:
    `toString` in class `java.lang.Object`

### compareTo

    public int compareTo(MetaGridData other)

  Note: this class has a natural ordering that is inconsistent with equals. It is hypothesized that 2 MetaGridData with same id and different sizes will *never* be compared. As this method is called very frequently, the implementation of compareTo() skips the comparison of size, relying only on the comparison of id.

  Specified by:
    `compareTo` in interface `java.lang.Comparable<MetaGridData>`

### equals

    public boolean equals(java.lang.Object obj)

  Overrides:
    `equals` in class `java.lang.Object`

### hashCode

    public int hashCode()

  Overrides:
    `hashCode` in class `java.lang.Object`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Lightweight Bartering Grid
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

> Copyright (c) 2005-2008, Cyril Briquet, parts Xavier Dalem.