public static interface Index.Factory
Modifier and Type | Method and Description |
---|---|
Index.RandomBuilder |
getBuilder() |
Index |
getEmptyIndex() |
Index |
getFlatIndex(long size)
Get a flat
Index containing the range [0, size), or an empty index if the
specified size is <= 0. |
Index |
getIndexByRange(long firstKey,
long lastKey)
Create an
Index containing the continuous range [firstKey, lastKey] |
Index |
getIndexByValues(long... keys)
Get an
Index containing the specified keys. |
Index |
getIndexByValues(gnu.trove.list.array.TLongArrayList list)
Get an
Index containing the specified keys. |
Index.RandomBuilder |
getRandomBuilder() |
Index.SequentialBuilder |
getSequentialBuilder() |
Index getIndexByValues(long... keys)
Index
containing the specified keys. All keys must be positive numberskeys
- The keys to add to the indexIndex getEmptyIndex()
Index getIndexByValues(gnu.trove.list.array.TLongArrayList list)
Index
containing the specified keys.
The provided list is sorted, and then passed to a sequential builder.list
- a Trove long array list; note that this list is mutated within the methodIndex getIndexByRange(long firstKey, long lastKey)
Index
containing the continuous range [firstKey, lastKey]firstKey
- The first key in the continuous rangelastKey
- The last key in the continuous rangeIndex getFlatIndex(long size)
Index
containing the range [0, size), or an empty index
if the
specified size is <= 0.size
- The size of the index to createIndex.RandomBuilder getRandomBuilder()
IndexBuilder
suitable for inserting ranges in no particular order.Index.SequentialBuilder getSequentialBuilder()
Index.RandomBuilder getBuilder()