Interface IndexedTable.Index
- All Known Implementing Classes:
MapIndex,UniqueLongArrayIndex
- Enclosing interface:
- IndexedTable
public static interface IndexedTable.Index
Indexes support fast lookups on key columns.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionbooleanareKeysUnique(boolean includeNull) Returns whether keys are unique in this index.it.unimi.dsi.fastutil.ints.IntSortedSetReturns the list of row numbers corresponding to "key" in this index.intfindUniqueLong(long key) Returns the row number corresponding to "key" in this index, orNOT_FOUNDif the key does not exist in the index.keyType()Returns the natural key type for the index.
-
Field Details
-
NOT_FOUND
static final int NOT_FOUND- See Also:
-
-
Method Details
-
keyType
ColumnType keyType()Returns the natural key type for the index. -
areKeysUnique
boolean areKeysUnique(boolean includeNull) Returns whether keys are unique in this index. If this returns true, thenfind(Object)will only ever return a zero- or one-element list.- Parameters:
includeNull- whether null is considered a valid key
-
find
Returns the list of row numbers corresponding to "key" in this index. If "key" is some type other than the natural typekeyType(), it will be converted before checking the index. -
findUniqueLong
int findUniqueLong(long key) Returns the row number corresponding to "key" in this index, orNOT_FOUNDif the key does not exist in the index. It is only valid to call this method ifkeyType()isValueType.LONGandareKeysUnique(boolean)returns true.- Throws:
UnsupportedOperationException- if preconditions are not met
-