JML

java.util
Class TreeSet

java.lang.Object
  extended byjava.util.AbstractCollection
      extended byjava.util.AbstractSet
          extended byjava.util.TreeSet
All Implemented Interfaces:
Cloneable, Collection, Serializable, Set, SortedSet

public class TreeSet
extends AbstractSet
implements SortedSet, Cloneable, Serializable


Field Summary
private  Set keySet
           
private  SortedMap m
           
private static Object PRESENT
           
private static long serialVersionUID
           
 
Constructor Summary
  TreeSet()
           
  TreeSet(Collection)
           
  TreeSet(Comparator)
           
private TreeSet(SortedMap)
           
  TreeSet(SortedSet)
           
 
Method Summary
 boolean add(Object)
           
 boolean addAll(Collection)
           
 void clear()
           
 Object clone()
           
 Comparator comparator()
           
 boolean contains(Object)
           
 Object first()
           
 SortedSet headSet(Object)
           
 boolean isEmpty()
           
 Iterator iterator()
           
 Object last()
           
private  void readObject(ObjectInputStream)
           
 boolean remove(Object)
           
 int size()
           
 SortedSet subSet(Object, Object)
           
 SortedSet tailSet(Object)
           
private  void writeObject(ObjectOutputStream)
           
 
Methods inherited from class java.util.AbstractSet
equals, hashCode, removeAll
 
Methods inherited from class java.util.AbstractCollection
containsAll, retainAll, toArray, toArray, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Set
containsAll, equals, hashCode, removeAll, retainAll, toArray, toArray
 

Field Detail

m

private transient SortedMap m

keySet

private transient Set keySet

PRESENT

private static final Object PRESENT

serialVersionUID

private static final long serialVersionUID
Constructor Detail

TreeSet

public TreeSet()

TreeSet

public TreeSet(Collection)

TreeSet

public TreeSet(Comparator)

TreeSet

private TreeSet(SortedMap)

TreeSet

public TreeSet(SortedSet)
Method Detail

size

public int size()
Specified by:
size in interface Set

clear

public void clear()
Specified by:
clear in interface Set
Overrides:
clear in class AbstractCollection

isEmpty

public boolean isEmpty()
Specified by:
isEmpty in interface Set
Overrides:
isEmpty in class AbstractCollection

readObject

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

writeObject

private void writeObject(ObjectOutputStream)
                  throws IOException
Throws:
IOException

clone

public Object clone()
Overrides:
clone in class Object

first

public Object first()
Specified by:
first in interface SortedSet

last

public Object last()
Specified by:
last in interface SortedSet

add

public boolean add(Object)
Specified by:
add in interface Set
Overrides:
add in class AbstractCollection

contains

public boolean contains(Object)
Specified by:
contains in interface Set
Overrides:
contains in class AbstractCollection

remove

public boolean remove(Object)
Specified by:
remove in interface Set
Overrides:
remove in class AbstractCollection

addAll

public boolean addAll(Collection)
Specified by:
addAll in interface Set
Overrides:
addAll in class AbstractCollection

comparator

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

iterator

public Iterator iterator()
Specified by:
iterator in interface Set

headSet

public SortedSet headSet(Object)
Specified by:
headSet in interface SortedSet

tailSet

public SortedSet tailSet(Object)
Specified by:
tailSet in interface SortedSet

subSet

public SortedSet subSet(Object,
                        Object)
Specified by:
subSet in interface SortedSet

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.