Interface IndexedTable.Index
-
- All Known Implementing Classes:
MapIndex,UniqueLongArrayIndex
- Enclosing interface:
- IndexedTable
public static interface IndexedTable.IndexIndexes support fast lookups on key columns.
-
-
Field Summary
Fields Modifier and Type Field Description static intNOT_FOUND
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanareKeysUnique(boolean includeNull)Returns whether keys are unique in this index.it.unimi.dsi.fastutil.ints.IntSortedSetfind(Object key)Returns 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.ColumnTypekeyType()Returns the natural key type for the index.
-
-
-
Field Detail
-
NOT_FOUND
static final int NOT_FOUND
- See Also:
- Constant Field Values
-
-
Method Detail
-
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
it.unimi.dsi.fastutil.ints.IntSortedSet find(@Nullable Object key)
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
-
-