Package net.sf.basedb.core
Class FeatureCoordinate
java.lang.Object
net.sf.basedb.core.FeatureCoordinate
Represents the coordinate of a feature on an array design. One coordinate
is equal to another if the row and column match and if either the block number
(if it is non-zero) or the meta row and meta column (if the block is zero) match.
- Version:
- 2.0
- Author:
- Enell, Nicklas
- Last modified
- $Date$
-
Field Summary
Modifier and TypeFieldDescriptionprivate final int
private final int
The column of this feature.private final int
private final int
private final int
The row of this feature. -
Constructor Summary
-
Method Summary
-
Field Details
-
block
private final int block -
metaRow
private final int metaRow -
metaColumn
private final int metaColumn -
row
private final int rowThe row of this feature. -
column
private final int columnThe column of this feature.
-
-
Constructor Details
-
FeatureCoordinate
public FeatureCoordinate(Integer block, Integer metaRow, Integer metaColumn, Integer row, Integer column) Create new object with the specified row and column.- Parameters:
block
- Block number the feature belongs to.metaRow
- Meta row numbermetaColumn
- Meta column numberrow
- Row number of the featurecolumn
- Column number of the feature.
-
-
Method Details
-
equals
Check if this object is equal to anotherFeatureCoordinate
object. For non-zero block number they are equal if the block, row and column match, otherwise they are equal if the metarow, metacolumn, row and column match. -
hashCode
public int hashCode()Calculate the hash code for the object. -
toString
Get the coordinate as [block, row, column] or [metarow, metacolumn, row, column] -
getBlock
public int getBlock() -
getMetaRow
public int getMetaRow() -
getMetaColumn
public int getMetaColumn() -
getColumn
public int getColumn() -
getRow
public int getRow()
-