|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
C
- the type keys this index is ordered byT
- the type of objects stored in this indexpublic interface OrderedIndex<C,T>
Defines an ordered index interface on objects.
The order is defined by IndexComparator
that can be accessed via
comparator()
method.
Method Summary | |
---|---|
IndexComparator<C,T> |
comparator()
Returns the comparator that defines order of this index. |
Search<T> |
search(C key,
boolean restrictEqual)
Returns a search for objects in this index using the internal comparator() of this index. |
Search<T> |
search(C from,
C to)
Returns a search for objects in this index using the internal comparator() of this index. |
Search<T> |
search(C startKey,
C from,
C to)
Returns a search for objects in this index using the internal comparator() of this index. |
Search<T> |
search(java.util.Collection<? extends C> keys)
Returns a search for objects in this index using the internal comparator() of this index. |
Methods inherited from interface messif.buckets.index.Index |
---|
search, search, search, search, size |
Method Detail |
---|
IndexComparator<C,T> comparator()
Search<T> search(C key, boolean restrictEqual) throws java.lang.IllegalStateException
comparator()
of this index.
If the restrictEqual
is true, the search returns only
objects that are comparator-equal to key
.
Objects are returned in the order defined by this index.
key
- the key to search forrestrictEqual
- if true, the search is restricted
only to objects that are comparator-equal to key
java.lang.IllegalStateException
- if there was an error initializing the search on this indexSearch<T> search(java.util.Collection<? extends C> keys) throws java.lang.IllegalStateException
comparator()
of this index.
All objects that are comparator
-equal to any of the given keys
are returned.
Objects are returned in the order defined by this index.
keys
- the keys to search for
java.lang.IllegalStateException
- if there was an error initializing the search on this indexSearch<T> search(C from, C to) throws java.lang.IllegalStateException
comparator()
of this index.
All objects from the interval [from, to]
are returned. If a null
value is specified as a boundary, that bound is not restricted. That means that
search(x, null)
will return all objects from this index that are bigger than
or equal to x
.
Objects are returned in the order defined by this index.
from
- the lower bound on the searched objects, i.e. objects greater or equal are returnedto
- the upper bound on the searched objects, i.e. objects smaller or equal are returned
java.lang.IllegalStateException
- if there was an error initializing the search on this indexSearch<T> search(C startKey, C from, C to) throws java.lang.IllegalStateException
comparator()
of this index.
All objects from the interval [from, to]
are returned. Search
starts at the object nearest to the given startKey
. If a null
value is specified as a boundary, that bound is not restricted. That means that
search(start, x, null)
will return all objects from this index that are bigger than
or equal to x
starting at object with key start
.
Objects are returned in the order defined by this index.
startKey
- the key from which to start the searchfrom
- the lower bound on the searched objects, i.e. objects greater or equal are returnedto
- the upper bound on the searched objects, i.e. objects smaller or equal are returned
java.lang.IllegalStateException
- if there was an error initializing the search on this index
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |