Package net.sf.basedb.core
Class FeatureCoordinate
java.lang.Object
net.sf.basedb.core.FeatureCoordinate
public class FeatureCoordinate extends Object
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
Fields Modifier and Type Field Description private int
block
private int
column
The column of this feature.private int
metaColumn
private int
metaRow
private int
row
The row of this feature. -
Constructor Summary
-
Method Summary
Modifier and Type Method Description boolean
equals(Object o)
Check if this object is equal to anotherFeatureCoordinate
object.int
getBlock()
int
getColumn()
int
getMetaColumn()
int
getMetaRow()
int
getRow()
int
hashCode()
Calculate the hash code for the object.String
toString()
Get the coordinate as [block, row, column] or [metarow, metacolumn, row, column]
-
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()
-