Package uk.ac.starlink.ttools.cone
Interface RowMapper<I>
public interface RowMapper<I>
Defines a mapping between objects of some given type and table row index.
The following invariants must hold:
rowIdToIndex(rowIndexToId(ix)) == ix rowIndexToId(rowIdToIndex(id)) == id
- Since:
- 14 May 2014
- Author:
- Mark Taylor
-
Method Summary
Modifier and TypeMethodDescriptionReturns the type of object used for representing row indices.long
rowIdToIndex
(I id) Returns the table row index corresponding to a given typed identifier.rowIndexToId
(long index) Returns a typed identifer corresponding to a given row index.
-
Method Details
-
getIdClass
Returns the type of object used for representing row indices.- Returns:
- mapper object class
-
rowIdToIndex
Returns the table row index corresponding to a given typed identifier.- Parameters:
id
- identifier object- Returns:
- corresponding row index
-
rowIndexToId
Returns a typed identifer corresponding to a given row index.- Parameters:
index
- row index- Returns:
- corresponding identifier object
-