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
 Class<I> getIdClass()
          Returns the type of object used for representing row indices.
 long rowIdToIndex(I id)
          Returns the table row index corresponding to a given typed identifier.
 I rowIndexToId(long index)
          Returns a typed identifer corresponding to a given row index.
 

Method Detail

getIdClass

Class<I> getIdClass()
Returns the type of object used for representing row indices.

Returns:
mapper object class

rowIdToIndex

long rowIdToIndex(I id)
Returns the table row index corresponding to a given typed identifier.

Parameters:
id - identifier object
Returns:
corresponding row index

rowIndexToId

I rowIndexToId(long index)
Returns a typed identifer corresponding to a given row index.

Parameters:
index - row index
Returns:
corresponding identifier object


Copyright © 2015 Central Laboratory of the Research Councils. All Rights Reserved.