org.compass.core.util.backport.java.util
Class TreeMap.DescendingSubMap

java.lang.Object
  extended by java.util.AbstractMap
      extended by org.compass.core.util.backport.java.util.AbstractMap
          extended by org.compass.core.util.backport.java.util.TreeMap.DescendingSubMap
All Implemented Interfaces:
Serializable, Map, SortedMap, NavigableMap
Enclosing class:
TreeMap

 class TreeMap.DescendingSubMap
extends AbstractMap


Nested Class Summary
 
Nested classes/interfaces inherited from class org.compass.core.util.backport.java.util.AbstractMap
AbstractMap.SimpleEntry, AbstractMap.SimpleImmutableEntry
 
Nested classes/interfaces inherited from interface java.util.Map
Map.Entry<K,V>
 
Field Summary
 
Fields inherited from class org.compass.core.util.backport.java.util.AbstractMap
keySet
 
Constructor Summary
TreeMap.DescendingSubMap(boolean fromStart, Object fromKey, boolean fromInclusive, boolean toEnd, Object toKey, boolean toInclusive)
           
 
Method Summary
protected  TreeMap.Entry ceiling(Object key)
           
 Comparator comparator()
           
 NavigableMap descendingMap()
          Returns a reverse order view of the mappings contained in this map.
protected  TreeMap.Entry first()
           
protected  TreeMap.Entry floor(Object key)
           
 NavigableMap headMap(Object toKey, boolean toInclusive)
          Returns a view of the portion of this map whose keys are less than (or equal to, if inclusive is true) toKey.
protected  TreeMap.Entry higher(Object key)
           
protected  TreeMap.Entry last()
           
protected  TreeMap.Entry lower(Object key)
           
 NavigableMap subMap(Object fromKey, boolean fromInclusive, Object toKey, boolean toInclusive)
          Returns a view of the portion of this map whose keys range from fromKey to toKey.
 NavigableMap tailMap(Object fromKey, boolean fromInclusive)
          Returns a view of the portion of this map whose keys are greater than (or equal to, if inclusive is true) fromKey.
protected  TreeMap.Entry uncheckedHigher(TreeMap.Entry e)
           
 
Methods inherited from class java.util.AbstractMap
clear, clone, containsValue, equals, hashCode, putAll, toString, values
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Map
clear, containsValue, equals, hashCode, putAll, values
 

Constructor Detail

TreeMap.DescendingSubMap

TreeMap.DescendingSubMap(boolean fromStart,
                         Object fromKey,
                         boolean fromInclusive,
                         boolean toEnd,
                         Object toKey,
                         boolean toInclusive)
Method Detail

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 map
fromInclusive - true if the low endpoint is to be included in the returned view
toKey - high endpoint of the keys in the returned map
toInclusive - 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 map
toInclusive - 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 map
fromInclusive - 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.