java.util
Class TreeMap.SubMap

java.lang.Object
  |
  +--java.util.AbstractMap
        |
        +--java.util.TreeMap.SubMap

private class TreeMap.SubMap
extends AbstractMap
implements SortedMap, Serializable

See Also:
Serialized Form

Inner Class Summary
private  class TreeMap.SubMap.EntrySetView
           
 
Field Summary
private  Set entrySet
           
private  Object fromKey
           
private  boolean fromStart
          fromKey is significant only if fromStart is false.
private  boolean toEnd
          fromKey is significant only if fromStart is false.
private  Object toKey
           
 
Fields inherited from class java.util.AbstractMap
keySet, values
 
Constructor Summary
(package private) TreeMap.SubMap(boolean fromStart, Object fromKey, boolean toEnd, Object toKey)
           
(package private) TreeMap.SubMap(Object key, boolean headMap)
           
(package private) TreeMap.SubMap(Object fromKey, Object toKey)
           
 
Method Summary
 Comparator comparator()
           
 boolean containsKey(Object key)
           
 Set entrySet()
           
 Object firstKey()
           
 Object get(Object key)
           
 SortedMap headMap(Object toKey)
           
private  boolean inRange(Object key)
           
private  boolean inRange2(Object key)
           
 boolean isEmpty()
           
 Object lastKey()
           
 Object put(Object key, Object value)
           
 SortedMap subMap(Object fromKey, Object toKey)
           
 SortedMap tailMap(Object fromKey)
           
 
Methods inherited from class java.util.AbstractMap
clear, containsValue, equals, hashCode, keySet, putAll, remove, size, toString, values
 
Methods inherited from class java.lang.Object
, clone, finalize, getClass, notify, notifyAll, registerNatives, wait, wait, wait
 

Field Detail

fromStart

private boolean fromStart
fromKey is significant only if fromStart is false. Similarly, toKey is significant only if toStart is false.

toEnd

private boolean toEnd
fromKey is significant only if fromStart is false. Similarly, toKey is significant only if toStart is false.

fromKey

private Object fromKey

toKey

private Object toKey

entrySet

private transient Set entrySet
Constructor Detail

TreeMap.SubMap

TreeMap.SubMap(Object fromKey,
               Object toKey)

TreeMap.SubMap

TreeMap.SubMap(Object key,
               boolean headMap)

TreeMap.SubMap

TreeMap.SubMap(boolean fromStart,
               Object fromKey,
               boolean toEnd,
               Object toKey)
Method Detail

isEmpty

public boolean isEmpty()
Overrides:
isEmpty in class AbstractMap

containsKey

public boolean containsKey(Object key)
Overrides:
containsKey in class AbstractMap

get

public Object get(Object key)
Overrides:
get in class AbstractMap

put

public Object put(Object key,
                  Object value)
Overrides:
put in class AbstractMap

comparator

public Comparator comparator()
Specified by:
comparator in interface SortedMap

firstKey

public Object firstKey()
Specified by:
firstKey in interface SortedMap

lastKey

public Object lastKey()
Specified by:
lastKey in interface SortedMap

entrySet

public Set entrySet()
Overrides:
entrySet in class AbstractMap

subMap

public SortedMap subMap(Object fromKey,
                        Object toKey)
Specified by:
subMap in interface SortedMap

headMap

public SortedMap headMap(Object toKey)
Specified by:
headMap in interface SortedMap

tailMap

public SortedMap tailMap(Object fromKey)
Specified by:
tailMap in interface SortedMap

inRange

private boolean inRange(Object key)

inRange2

private boolean inRange2(Object key)