|
2.17.2: 2011-06-17 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.basedb.core.BlockInfo
public final class BlockInfo
A BlockInfo
object is used to represent the uniqe identifiers of an
ArrayDesignBlock
. It can either be the
block number or the metagrid coordinates. If block number is used metagrid can be
added but they are not used to identify an arraydesignblock and it is possible to
create two blocks with the same metagrid as long as the blocknumbers are uniqe.
Field Summary | |
---|---|
private int |
block
The block number. |
private int |
metaGridX
The X coordinate of the block. |
private int |
metaGridY
The Y coordinate of the block. |
Constructor Summary | |
---|---|
BlockInfo(int metaGridX,
int metaGridY)
Create a new block info using the meta coordinates. |
|
BlockInfo(int block,
int metaGridX,
int metaGridY)
Create a new block info using meta coordinates. |
Method Summary | |
---|---|
boolean |
equals(Object o)
Check if this object is equal to another BlockInfo
object. |
int |
getBlock()
Get the block number. |
int |
getMetaGridX()
Get the row or x meta coordinate. |
int |
getMetaGridY()
Get the column or y meta coordinate. |
int |
hashCode()
Calculate the hash code for the object. |
String |
toString()
Get the coordinate as [number;metaGridX,metaGridY] |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private final int block
private final int metaGridY
private final int metaGridX
Constructor Detail |
---|
public BlockInfo(int metaGridX, int metaGridY) throws InvalidDataException
metaGridX
- The row or x meta coordinatemetaGridY
- The column or y meta coordinate
InvalidDataException
- If any of the coordinates is 0 or negativepublic BlockInfo(int block, int metaGridX, int metaGridY) throws InvalidDataException
block
- The block number which must be greater or equal than 0metaGridX
- The row or x meta coordinate, use 0 if unknownmetaGridY
- The column or y meta coordinate, use 0 if unknown
InvalidDataException
- If the block number is 0 or negativeMethod Detail |
---|
public final boolean equals(Object o)
BlockInfo
object. They are equal if they have the same block number > 0, or the same meta
coordinates.
equals
in class Object
public final int hashCode()
hashCode
in class Object
public final String toString()
toString
in class Object
public int getMetaGridX()
public int getMetaGridY()
public int getBlock()
|
2.17.2: 2011-06-17 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |