|
Oracle® Coherence Java API Reference Release 3.7.1.0 E22843-01 |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
com.tangosol.util.WrapperCollections.AbstractWrapperCollection
com.tangosol.util.WrapperCollections.AbstractWrapperSet
com.tangosol.util.WrapperCollections.AbstractWrapperSortedSet
public abstract static class WrapperCollections.AbstractWrapperSortedSet
SortedSet implementation which delegates all calls to another SortedSet.
Constructor Summary | |
---|---|
protected |
WrapperCollections.AbstractWrapperSortedSet(java.util.SortedSet set) Create an AbstractWrapperSortedSet which delegates to the specified SortedSet. |
Method Summary | |
---|---|
java.util.Comparator |
comparator() Returns the comparator associated with this sorted set, or null if it uses its elements' natural ordering. |
java.lang.Object |
first() Returns the first (lowest) element currently in this sorted set. |
protected java.util.SortedSet |
getDelegate() Return the SortedSet to which all operations should be delegated to. |
java.util.SortedSet |
headSet(java.lang.Object oTo) Returns a view of the portion of this sorted set whose elements are strictly less than toElement. |
java.lang.Object |
last() Returns the last (highest) element currently in this sorted set. |
java.util.SortedSet |
subSet(java.lang.Object oFrom, java.lang.Object oTo) Returns a view of the portion of this sorted set whose elements range from fromElement, inclusive, to toElement, exclusive. |
java.util.SortedSet |
tailSet(java.lang.Object oFrom) Returns a view of the portion of this sorted set whose elements are greater than or equal to fromElement. |
Methods inherited from class com.tangosol.util.WrapperCollections.AbstractWrapperCollection |
---|
add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray, toString |
Methods inherited from interface java.util.Set |
---|
add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray |
Constructor Detail |
---|
protected WrapperCollections.AbstractWrapperSortedSet(java.util.SortedSet set)
set
- the SortedSet to delegate all calls toMethod Detail |
---|
protected java.util.SortedSet getDelegate()
getDelegate
in class WrapperCollections.AbstractWrapperSet
public java.util.Comparator comparator()
comparator
in interface java.util.SortedSet
public java.util.SortedSet subSet(java.lang.Object oFrom, java.lang.Object oTo)
The sorted set returned by this method will throw an IllegalArgumentException if the user attempts to insert a element outside the specified range.
Note: this method always returns a half-open range (which includes its low endpoint but not its high endpoint). If you need a closed range (which includes both endpoints), and the element type allows for calculation of the successor a given value, merely request the subrange from lowEndpoint to successor(highEndpoint). For example, suppose that s is a sorted set of strings. The following idiom obtains a view containing all of the strings in s from low to high, inclusive:
SortedSet sub = s.subSet(low, high+"\0");A similar technique can be used to generate an open range (which contains neither endpoint). The following idiom obtains a view containing all of the Strings in s from low to high, exclusive:
SortedSet sub = s.subSet(low+"\0", high);
subSet
in interface java.util.SortedSet
oFrom
- low endpoint (inclusive) of the subSet.oTo
- high endpoint (exclusive) of the subSet.public java.util.SortedSet headSet(java.lang.Object oTo)
The sorted set returned by this method will throw an IllegalArgumentException if the user attempts to insert a element outside the specified range.
Note: this method always returns a view that does not contain its (high) endpoint. If you need a view that does contain this endpoint, and the element type allows for calculation of the successor a given value, merely request a headSet bounded by successor(highEndpoint). For example, suppose that s is a sorted set of strings. The following idiom obtains a view containing all of the strings in s that are less than or equal to high:
SortedSet head = s.headSet(high+"\0");
headSet
in interface java.util.SortedSet
oTo
- high endpoint (exclusive) of the headSet.public java.util.SortedSet tailSet(java.lang.Object oFrom)
The sorted set returned by this method will throw an IllegalArgumentException if the user attempts to insert a element outside the specified range.
Note: this method always returns a view that contains its (low) endpoint. If you need a view that does not contain this endpoint, and the element type allows for calculation of the successor a given value, merely request a tailSet bounded by successor(lowEndpoint). For example, suppose that s is a sorted set of strings. The following idiom obtains a view containing all of the strings in s that are strictly greater than low:
SortedSet tail = s.tailSet(low+"\0");
tailSet
in interface java.util.SortedSet
oFrom
- low endpoint (inclusive) of the tailSet.public java.lang.Object first()
first
in interface java.util.SortedSet
public java.lang.Object last()
last
in interface java.util.SortedSet
|
Oracle® Coherence Java API Reference Release 3.7.1.0 E22843-01 |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |