public class UniqueLongArrayIndex extends Object implements IndexedTable.Index
IndexedTable.Index backed by an int array.
This is for long-typed keys whose values all fall in a "reasonable" range.NOT_FOUND| Modifier and Type | Method and Description |
|---|---|
boolean |
areKeysUnique()
Returns whether keys are unique in this index.
|
it.unimi.dsi.fastutil.ints.IntList |
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, or
IndexedTable.Index.NOT_FOUND if the key does not exist
in the index. |
ValueType |
keyType()
Returns the natural key type for the index.
|
public ValueType keyType()
IndexedTable.IndexkeyType in interface IndexedTable.Indexpublic boolean areKeysUnique()
IndexedTable.IndexIndexedTable.Index.find(Object) will only ever
return a zero- or one-element list.areKeysUnique in interface IndexedTable.Indexpublic it.unimi.dsi.fastutil.ints.IntList find(Object key)
IndexedTable.IndexIndexedTable.Index.keyType(), it will be converted before checking
the index.find in interface IndexedTable.Indexpublic int findUniqueLong(long key)
IndexedTable.IndexIndexedTable.Index.NOT_FOUND if the key does not exist
in the index.
It is only valid to call this method if IndexedTable.Index.keyType() is ValueType.LONG and IndexedTable.Index.areKeysUnique()
returns true.findUniqueLong in interface IndexedTable.IndexCopyright © 2011–2021 The Apache Software Foundation. All rights reserved.