|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
T
- The type of key for the index.ID
- The value type being indexed.public interface IdxIndex<T,ID>
Base interface for an index. An index maps a key type to an associated ID or set of IDs depending on its uniqueness.
Nested Class Summary | |
---|---|
static interface |
IdxIndex.Stats<K>
Stats describe the size and composition of an IdxIndex . |
Method Summary | ||
---|---|---|
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. |
|
|
getEntries(IdxRange<KEY> range,
boolean ascending)
Retrieve the indexed values within the specified range. |
|
|
getField()
Retrieve the IdxField on which the index is defined. |
|
|
getIds(IdxRange<KEY> range)
Gets the an Iterable of the IDs in the given IdxRange |
|
|
getIds(IdxRange<KEY> range,
Comparator<ID> valueSorter)
Gets the an Iterable of the IDs in the given IdxRange |
|
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. |
Method Detail |
---|
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)
Iterable
of the IDs in the given IdxRange
range
- The range whose IDs should be retrieved.
Iterable
of the IDs in the given IdxRange
<KEY extends Comparable<KEY>> Iterable<ID> getIds(IdxRange<KEY> range, Comparator<ID> valueSorter)
Iterable
of the IDs in the given IdxRange
range
- The range whose IDs should be retrieved.valueSorter
- If specified the comparator will be used to order the resulting values.
Iterable
of the IDs in the given IdxRange
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 values
int valueCount(Iterable<? extends Object> values)
values
- The list of keys for which to count values
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |