JML

java.util
Class TreeMap

java.lang.Object
  extended byjava.util.AbstractMap
      extended byjava.util.TreeMap
All Implemented Interfaces:
Cloneable, Map, NavigableMap, Serializable, SortedMap

public class TreeMap
extends AbstractMap
implements NavigableMap, Cloneable, Serializable


Nested Class Summary
(package private) static class TreeMap.AscendingSubMap
           
(package private)  class TreeMap.DescendingKeyIterator
           
(package private) static class TreeMap.DescendingSubMap
           
(package private) static class TreeMap.Entry
           
(package private)  class TreeMap.EntryIterator
           
(package private)  class TreeMap.EntrySet
           
(package private)  class TreeMap.KeyIterator
           
(package private) static class TreeMap.KeySet
           
(package private) static class TreeMap.NavigableSubMap
           
(package private)  class TreeMap.PrivateEntryIterator
           
private  class TreeMap.SubMap
           
(package private)  class TreeMap.ValueIterator
           
(package private)  class TreeMap.Values
           
 
Nested classes inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry, AbstractMap.SimpleImmutableEntry
 
Field Summary
private static boolean BLACK
           
private  Comparator comparator
           
private  NavigableMap descendingMap
           
private  TreeMap.EntrySet entrySet
           
private  int modCount
           
private  TreeMap.KeySet navigableKeySet
           
private static boolean RED
           
private  TreeMap.Entry root
           
private static long serialVersionUID
           
private  int size
           
 
Fields inherited from class java.util.AbstractMap
keySet, values
 
Constructor Summary
TreeMap()
           
TreeMap(Comparator)
           
TreeMap(Map)
           
TreeMap(SortedMap)
           
 
Method Summary
(package private)  void addAllForTreeSet(SortedSet, Object)
           
private  TreeMap.Entry buildFromSorted(int, int, int, int, Iterator, ObjectInputStream, Object)
           
private  void buildFromSorted(int, Iterator, ObjectInputStream, Object)
           
 Map.Entry ceilingEntry(Object)
           
 Object ceilingKey(Object)
           
 void clear()
           
 Object clone()
           
private static boolean colorOf(TreeMap.Entry)
           
 Comparator comparator()
           
(package private)  int compare(Object, Object)
           
private static int computeRedLevel(int)
           
 boolean containsKey(Object)
           
 boolean containsValue(Object)
           
private  void deleteEntry(TreeMap.Entry)
           
(package private)  Iterator descendingKeyIterator()
           
 NavigableSet descendingKeySet()
           
 NavigableMap descendingMap()
           
 Set entrySet()
           
(package private) static Map.Entry exportEntry(TreeMap.Entry)
           
 Map.Entry firstEntry()
           
 Object firstKey()
           
private  void fixAfterDeletion(TreeMap.Entry)
           
private  void fixAfterInsertion(TreeMap.Entry)
           
 Map.Entry floorEntry(Object)
           
 Object floorKey(Object)
           
 Object get(Object)
           
(package private)  TreeMap.Entry getCeilingEntry(Object)
           
(package private)  TreeMap.Entry getEntry(Object)
           
(package private)  TreeMap.Entry getEntryUsingComparator(Object)
           
(package private)  TreeMap.Entry getFirstEntry()
           
(package private)  TreeMap.Entry getFloorEntry(Object)
           
(package private)  TreeMap.Entry getHigherEntry(Object)
           
(package private)  TreeMap.Entry getLastEntry()
           
(package private)  TreeMap.Entry getLowerEntry(Object)
           
 SortedMap headMap(Object)
           
 NavigableMap headMap(Object, boolean)
           
 Map.Entry higherEntry(Object)
           
 Object higherKey(Object)
           
(package private) static Object key(TreeMap.Entry)
           
(package private)  Iterator keyIterator()
           
(package private) static Object keyOrNull(TreeMap.Entry)
           
 Set keySet()
           
 Map.Entry lastEntry()
           
 Object lastKey()
           
private static TreeMap.Entry leftOf(TreeMap.Entry)
           
 Map.Entry lowerEntry(Object)
           
 Object lowerKey(Object)
           
 NavigableSet navigableKeySet()
           
private static TreeMap.Entry parentOf(TreeMap.Entry)
           
 Map.Entry pollFirstEntry()
           
 Map.Entry pollLastEntry()
           
(package private) static TreeMap.Entry predecessor(TreeMap.Entry)
           
 Object put(Object, Object)
           
 void putAll(Map)
           
private  void readObject(ObjectInputStream)
           
(package private)  void readTreeSet(int, ObjectInputStream, Object)
           
 Object remove(Object)
           
private static TreeMap.Entry rightOf(TreeMap.Entry)
           
private  void rotateLeft(TreeMap.Entry)
           
private  void rotateRight(TreeMap.Entry)
           
private static void setColor(TreeMap.Entry, boolean)
           
 int size()
           
 NavigableMap subMap(Object, boolean, Object, boolean)
           
 SortedMap subMap(Object, Object)
           
(package private) static TreeMap.Entry successor(TreeMap.Entry)
           
 SortedMap tailMap(Object)
           
 NavigableMap tailMap(Object, boolean)
           
(package private) static boolean valEquals(Object, Object)
           
 Collection values()
           
private  void writeObject(ObjectOutputStream)
           
 
Methods inherited from class java.util.AbstractMap
equals, hashCode, isEmpty, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Map
equals, hashCode, isEmpty
 

Field Detail

comparator

private final Comparator comparator

serialVersionUID

private static final long serialVersionUID

descendingMap

private transient NavigableMap descendingMap

modCount

private transient int modCount

navigableKeySet

private transient TreeMap.KeySet navigableKeySet

entrySet

private transient TreeMap.EntrySet entrySet

root

private transient TreeMap.Entry root

RED

private static final boolean RED

BLACK

private static final boolean BLACK

size

private transient int size
Constructor Detail

TreeMap

public TreeMap()

TreeMap

public TreeMap(Comparator)

TreeMap

public TreeMap(Map)

TreeMap

public TreeMap(SortedMap)
Method Detail

size

public int size()
Specified by:
size in interface Map
Overrides:
size in class AbstractMap

containsKey

public boolean containsKey(Object)
Specified by:
containsKey in interface Map
Overrides:
containsKey in class AbstractMap

containsValue

public boolean containsValue(Object)
Specified by:
containsValue in interface Map
Overrides:
containsValue in class AbstractMap

get

public Object get(Object)
Specified by:
get in interface Map
Overrides:
get 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

putAll

public void putAll(Map)
Specified by:
putAll in interface Map
Overrides:
putAll in class AbstractMap

getEntry

final TreeMap.Entry getEntry(Object)

getEntryUsingComparator

final TreeMap.Entry getEntryUsingComparator(Object)

getCeilingEntry

final TreeMap.Entry getCeilingEntry(Object)

getFloorEntry

final TreeMap.Entry getFloorEntry(Object)

getHigherEntry

final TreeMap.Entry getHigherEntry(Object)

getLowerEntry

final TreeMap.Entry getLowerEntry(Object)

put

public Object put(Object,
                  Object)
Specified by:
put in interface Map
Overrides:
put in class AbstractMap

remove

public Object remove(Object)
Specified by:
remove in interface Map
Overrides:
remove in class AbstractMap

clear

public void clear()
Specified by:
clear in interface Map
Overrides:
clear in class AbstractMap

clone

public Object clone()
Overrides:
clone in class AbstractMap

firstEntry

public Map.Entry firstEntry()
Specified by:
firstEntry in interface NavigableMap

lastEntry

public Map.Entry lastEntry()
Specified by:
lastEntry in interface NavigableMap

pollFirstEntry

public Map.Entry pollFirstEntry()
Specified by:
pollFirstEntry in interface NavigableMap

pollLastEntry

public Map.Entry pollLastEntry()
Specified by:
pollLastEntry in interface NavigableMap

lowerEntry

public Map.Entry lowerEntry(Object)
Specified by:
lowerEntry in interface NavigableMap

lowerKey

public Object lowerKey(Object)
Specified by:
lowerKey in interface NavigableMap

floorEntry

public Map.Entry floorEntry(Object)
Specified by:
floorEntry in interface NavigableMap

floorKey

public Object floorKey(Object)
Specified by:
floorKey in interface NavigableMap

ceilingEntry

public Map.Entry ceilingEntry(Object)
Specified by:
ceilingEntry in interface NavigableMap

ceilingKey

public Object ceilingKey(Object)
Specified by:
ceilingKey in interface NavigableMap

higherEntry

public Map.Entry higherEntry(Object)
Specified by:
higherEntry in interface NavigableMap

higherKey

public Object higherKey(Object)
Specified by:
higherKey in interface NavigableMap

keySet

public Set keySet()
Specified by:
keySet in interface Map
Overrides:
keySet in class AbstractMap

navigableKeySet

public NavigableSet navigableKeySet()
Specified by:
navigableKeySet in interface NavigableMap

descendingKeySet

public NavigableSet descendingKeySet()
Specified by:
descendingKeySet in interface NavigableMap

values

public Collection values()
Specified by:
values in interface Map
Overrides:
values in class AbstractMap

entrySet

public Set entrySet()
Specified by:
entrySet in interface Map

descendingMap

public NavigableMap descendingMap()
Specified by:
descendingMap in interface NavigableMap

subMap

public NavigableMap subMap(Object,
                           boolean,
                           Object,
                           boolean)
Specified by:
subMap in interface NavigableMap

headMap

public NavigableMap headMap(Object,
                            boolean)
Specified by:
headMap in interface NavigableMap

tailMap

public NavigableMap tailMap(Object,
                            boolean)
Specified by:
tailMap in interface NavigableMap

subMap

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

headMap

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

tailMap

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

keyIterator

Iterator keyIterator()

descendingKeyIterator

Iterator descendingKeyIterator()

compare

final int compare(Object,
                  Object)

valEquals

static final boolean valEquals(Object,
                               Object)

exportEntry

static Map.Entry exportEntry(TreeMap.Entry)

keyOrNull

static Object keyOrNull(TreeMap.Entry)

key

static Object key(TreeMap.Entry)

getFirstEntry

final TreeMap.Entry getFirstEntry()

getLastEntry

final TreeMap.Entry getLastEntry()

successor

static TreeMap.Entry successor(TreeMap.Entry)

predecessor

static TreeMap.Entry predecessor(TreeMap.Entry)

colorOf

private static boolean colorOf(TreeMap.Entry)

parentOf

private static TreeMap.Entry parentOf(TreeMap.Entry)

setColor

private static void setColor(TreeMap.Entry,
                             boolean)

leftOf

private static TreeMap.Entry leftOf(TreeMap.Entry)

rightOf

private static TreeMap.Entry rightOf(TreeMap.Entry)

rotateLeft

private void rotateLeft(TreeMap.Entry)

rotateRight

private void rotateRight(TreeMap.Entry)

fixAfterInsertion

private void fixAfterInsertion(TreeMap.Entry)

deleteEntry

private void deleteEntry(TreeMap.Entry)

fixAfterDeletion

private void fixAfterDeletion(TreeMap.Entry)

writeObject

private void writeObject(ObjectOutputStream)
                  throws IOException
Throws:
IOException

readObject

private void readObject(ObjectInputStream)
                 throws IOException,
                        ClassNotFoundException
Throws:
IOException
ClassNotFoundException

readTreeSet

void readTreeSet(int,
                 ObjectInputStream,
                 Object)
           throws IOException,
                  ClassNotFoundException
Throws:
IOException
ClassNotFoundException

addAllForTreeSet

void addAllForTreeSet(SortedSet,
                      Object)

buildFromSorted

private void buildFromSorted(int,
                             Iterator,
                             ObjectInputStream,
                             Object)
                      throws IOException,
                             ClassNotFoundException
Throws:
IOException
ClassNotFoundException

buildFromSorted

private final TreeMap.Entry buildFromSorted(int,
                                            int,
                                            int,
                                            int,
                                            Iterator,
                                            ObjectInputStream,
                                            Object)
                                     throws IOException,
                                            ClassNotFoundException
Throws:
IOException
ClassNotFoundException

computeRedLevel

private static int computeRedLevel(int)

JML

JML is Copyright (C) 1998-2002 by Iowa State University and is distributed under the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This release depends on code from the MultiJava project and is based in part on the Kopi project Copyright (C) 1990-99 DMS Decision Management Systems Ges.m.b.H.