T
- The type of key for the index.ID
- The value type being indexed.public interface IdxIndex<T,ID>
Modifier and Type | Interface and Description |
---|---|
static interface |
IdxIndex.Stats<K>
Stats describe the size and composition of an
IdxIndex . |
Modifier and Type | Method and Description |
---|---|
Iterable<Map.Entry<T,ID>> |
allEntries(boolean ascending)
Retrieve all of the indexed values.
|
Iterable<ID> |
allIds(boolean ascending)
Retrieve all record ids from the index.
|
boolean |
containsKey(T value)
Determine whether the index contains the specified key.
|
<KEY extends Comparable<KEY>> |
getEntries(IdxRange<KEY> range,
boolean ascending)
Retrieve the indexed values within the specified range.
|
<REC> IdxField<REC,T> |
getField()
Retrieve the
IdxField on which the index is defined. |
<KEY extends Comparable<KEY>> |
getIds(IdxRange<KEY> range)
|
<KEY extends Comparable<KEY>> |
getIds(IdxRange<KEY> range,
Comparator<ID> valueSorter)
|
String |
getName()
Gets the name of the index.
|
IdxIndex.Stats<T> |
getStats()
Retrieve the
IdxIndex.Stats for this index. |
boolean |
isUnique()
Tests if this is a unique index.
|
void |
put(T value,
ID id)
Store a key/value pair in the index.
|
void |
remove(T value,
ID id)
Removes a key/value paid from the index.
|
int |
valueCount(Iterable<? extends Object> values)
Gets the number of values for the given key.
|
String getName()
void put(T value, ID id)
value
- The key to be indexed.id
- The value to index.void remove(T value, ID id)
value
- The key to remove.id
- The value to remove.boolean containsKey(T value)
value
- The key to look for.IdxIndex.Stats<T> getStats()
IdxIndex.Stats
for this index.IdxIndex.Stats
for this index.<REC> IdxField<REC,T> getField()
IdxField
on which the index is defined.IdxIndex
indexes.boolean isUnique()
true
If this is a unique indexIterable<ID> allIds(boolean ascending)
ascending
- Indicates whether the index is read in ascending key order or descending key order.<KEY extends Comparable<KEY>> Iterable<ID> getIds(IdxRange<KEY> range)
<KEY extends Comparable<KEY>> Iterable<ID> getIds(IdxRange<KEY> range, Comparator<ID> valueSorter)
Iterable<Map.Entry<T,ID>> allEntries(boolean ascending)
<KEY extends Comparable<KEY>> Iterable<Map.Entry<T,ID>> getEntries(IdxRange<KEY> range, boolean ascending)
range
- The range of indexed valuesCopyright © 2019 Neeve Research, LLC. All Rights Reserved.