C
- the type keys this index is ordered byT
- the type of objects stored in this indexpublic interface ModifiableOrderedIndex<C,T> extends OrderedIndex<C,T>, ModifiableIndex<T>, Addible<T>
Removable.remove()
method of the search results.
Index's order is defined by IndexComparator
that can be accessed via
comparator()
method.Modifier and Type | Method and Description |
---|---|
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. |
comparator
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 forjava.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 returnedjava.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 returnedjava.lang.IllegalStateException
- if there was an error initializing the search on this index