Package uk.ac.starlink.table.join
Class RowRef
java.lang.Object
uk.ac.starlink.table.join.RowRef
- All Implemented Interfaces:
Comparable<RowRef>
Represents a reference to a table row.
This class really just exists to encapsulate the combination of an
int
index referencing a table
and a long
referencing a row of that table.
Importantly though, it implements equals
, hashCode
and the Comparable
interface in such a way as to make it
suitable for use as keys in a SortedSet.
The sort order defined sorts lowest table index first, then lowest
row index.- Author:
- Mark Taylor (Starlink)
-
Constructor Details
-
RowRef
public RowRef(int iTable, long lRow) Constructs a new RowRef from a table and a row index.- Parameters:
iTable
- table indexlRow
- row index
-
-
Method Details
-
getTableIndex
public int getTableIndex()Returns the table index.- Returns:
- table index
-
getRowIndex
public long getRowIndex()Returns the row index;- Returns:
- row index
-
equals
-
hashCode
public int hashCode() -
compareTo
- Specified by:
compareTo
in interfaceComparable<RowRef>
-
toString
-