|
||||||||||
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 ModifiableOrderedIndex<C,T>
Defines a modifiable ordered index interface on objects.
This index allows to add objects and remove them using Removable.remove()
method of the search results.
Index's order is defined by IndexComparator
that can be accessed via
comparator()
method.
Method Summary | |
---|---|
ModifiableSearch<T> |
search(C key,
boolean restrictEqual)
Returns a search for objects in this index using the internal OrderedIndex.comparator() of this index. |
ModifiableSearch<T> |
search(C from,
C to)
Returns a search for objects in this index using the internal OrderedIndex.comparator() of this index. |
ModifiableSearch<T> |
search(C startKey,
C from,
C to)
Returns a search for objects in this index using the internal OrderedIndex.comparator() of this index. |
ModifiableSearch<T> |
search(java.util.Collection<? extends C> keys)
Returns a search for objects in this index using the internal OrderedIndex.comparator() of this index. |
Methods inherited from interface messif.buckets.index.OrderedIndex |
---|
comparator |
Methods inherited from interface messif.buckets.index.ModifiableIndex |
---|
destroy, finalize, search, search, search, search |
Methods inherited from interface messif.buckets.index.Index |
---|
size |
Methods inherited from interface messif.buckets.Addible |
---|
add |
Method Detail |
---|
ModifiableSearch<T> search(C key, boolean restrictEqual) throws java.lang.IllegalStateException
OrderedIndex
OrderedIndex.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.
search
in interface OrderedIndex<C,T>
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 indexModifiableSearch<T> search(java.util.Collection<? extends C> keys) throws java.lang.IllegalStateException
OrderedIndex
OrderedIndex.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.
search
in interface OrderedIndex<C,T>
keys
- the keys to search for
java.lang.IllegalStateException
- if there was an error initializing the search on this indexModifiableSearch<T> search(C from, C to) throws java.lang.IllegalStateException
OrderedIndex
OrderedIndex.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.
search
in interface OrderedIndex<C,T>
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 indexModifiableSearch<T> search(C startKey, C from, C to) throws java.lang.IllegalStateException
OrderedIndex
OrderedIndex.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.
search
in interface OrderedIndex<C,T>
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 |