org.compass.core.util.backport.java.util
Class TreeMap.AscendingSubMap
java.lang.Object
java.util.AbstractMap
org.compass.core.util.backport.java.util.AbstractMap
org.compass.core.util.backport.java.util.TreeMap.AscendingSubMap
- All Implemented Interfaces:
- Serializable, Map, SortedMap, NavigableMap
- Enclosing class:
- TreeMap
class TreeMap.AscendingSubMap
- extends AbstractMap
| Nested classes/interfaces inherited from interface java.util.Map |
Map.Entry<K,V> |
| Fields inherited from class org.compass.core.util.backport.java.util.AbstractMap |
keySet |
TreeMap.AscendingSubMap
TreeMap.AscendingSubMap(boolean fromStart,
Object fromKey,
boolean fromInclusive,
boolean toEnd,
Object toKey,
boolean toInclusive)
comparator
public Comparator comparator()
first
protected TreeMap.Entry first()
last
protected TreeMap.Entry last()
lower
protected TreeMap.Entry lower(Object key)
floor
protected TreeMap.Entry floor(Object key)
ceiling
protected TreeMap.Entry ceiling(Object key)
higher
protected TreeMap.Entry higher(Object key)
uncheckedHigher
protected TreeMap.Entry uncheckedHigher(TreeMap.Entry e)
subMap
public NavigableMap subMap(Object fromKey,
boolean fromInclusive,
Object toKey,
boolean toInclusive)
- Description copied from interface:
NavigableMap
- Returns a view of the portion of this map whose keys range from
fromKey to toKey. If fromKey and
toKey are equal, the returned map is empty unless
fromExclusive and toExclusive are both true. The
returned map is backed by this map, so changes in the returned map are
reflected in this map, and vice-versa. The returned map supports all
optional map operations that this map supports.
The returned map will throw an IllegalArgumentException
on an attempt to insert a key outside of its range, or to construct a
submap either of whose endpoints lie outside its range.
- Parameters:
fromKey - low endpoint of the keys in the returned mapfromInclusive - true if the low endpoint
is to be included in the returned viewtoKey - high endpoint of the keys in the returned maptoInclusive - true if the high endpoint
is to be included in the returned view
- Returns:
- a view of the portion of this map whose keys range from
fromKey to toKey
headMap
public NavigableMap headMap(Object toKey,
boolean toInclusive)
- Description copied from interface:
NavigableMap
- Returns a view of the portion of this map whose keys are less than (or
equal to, if
inclusive is true) toKey. The returned
map is backed by this map, so changes in the returned map are reflected
in this map, and vice-versa. The returned map supports all optional
map operations that this map supports.
The returned map will throw an IllegalArgumentException
on an attempt to insert a key outside its range.
- Parameters:
toKey - high endpoint of the keys in the returned maptoInclusive - true if the high endpoint
is to be included in the returned view
- Returns:
- a view of the portion of this map whose keys are less than
(or equal to, if
inclusive is true) toKey
tailMap
public NavigableMap tailMap(Object fromKey,
boolean fromInclusive)
- Description copied from interface:
NavigableMap
- Returns a view of the portion of this map whose keys are greater than (or
equal to, if
inclusive is true) fromKey. The returned
map is backed by this map, so changes in the returned map are reflected
in this map, and vice-versa. The returned map supports all optional
map operations that this map supports.
The returned map will throw an IllegalArgumentException
on an attempt to insert a key outside its range.
- Parameters:
fromKey - low endpoint of the keys in the returned mapfromInclusive - true if the low endpoint
is to be included in the returned view
- Returns:
- a view of the portion of this map whose keys are greater than
(or equal to, if
inclusive is true) fromKey
descendingMap
public NavigableMap descendingMap()
- Description copied from interface:
NavigableMap
- Returns a reverse order view of the mappings contained in this map.
The descending map is backed by this map, so changes to the map are
reflected in the descending map, and vice-versa. If either map is
modified while an iteration over a collection view of either map
is in progress (except through the iterator's own
remove
operation), the results of the iteration are undefined.
The returned map has an ordering equivalent to
Collections.reverseOrder(comparator()).
The expression m.descendingMap().descendingMap() returns a
view of m essentially equivalent to m.
- Returns:
- a reverse order view of this map
Copyright (c) 2004-2006 The Compass Project.