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 Modifier and Type Field Description static int
NOT_FOUND
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
areKeysUnique(boolean includeNull)
Returns whether keys are unique in this index.it.unimi.dsi.fastutil.ints.IntSortedSet
find(Object key)
Returns the list of row numbers corresponding to "key" in this index.int
findUniqueLong(long key)
Returns the row number corresponding to "key" in this index, orNOT_FOUND
if the key does not exist in the index.ColumnType
keyType()
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_FOUND
if the key does not exist in the index. It is only valid to call this method ifkeyType()
isValueType.LONG
andareKeysUnique(boolean)
returns true.- Throws:
UnsupportedOperationException
- if preconditions are not met
-
-