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 Details

    • block

      private final int block
    • metaRow

      private final int metaRow
    • metaColumn

      private final int metaColumn
    • row

      private final int row
      The row of this feature.
    • column

      private final int column
      The 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 number
      metaColumn - Meta column number
      row - Row number of the feature
      column - Column number of the feature.
  • Method Details

    • equals

      public boolean equals​(Object o)
      Check if this object is equal to another FeatureCoordinate 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.
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Calculate the hash code for the object.
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Get the coordinate as [block, row, column] or [metarow, metacolumn, row, column]
      Overrides:
      toString in class Object
    • getBlock

      public int getBlock()
    • getMetaRow

      public int getMetaRow()
    • getMetaColumn

      public int getMetaColumn()
    • getColumn

      public int getColumn()
    • getRow

      public int getRow()