jade.util.leap
Class SortedSetImpl

java.lang.Object
  |
  +--jade.util.leap.SortedSetImpl

public class SortedSetImpl
extends java.lang.Object
implements SortedSet

This class represents the J2SE version of a "SortedSet" implementation to be used in LEAP.

Version:
1.0, 20/10/00
Author:
Nicolas Lhuillier
See Also:
java.util.SortedSet, java.util.TreeSet

Constructor Summary
SortedSetImpl()
          Default Constructor, creates an empty Set, according to the elements' natural order.
 
Method Summary
 boolean add(java.lang.Object o)
          Adds an element.
 java.lang.Object first()
          Returns the first (lowest) element currently in this sorted set.
 boolean isEmpty()
          Checks if the collection contains elements.
 Iterator iterator()
          Returns an iterator over the elements in this collection.
 boolean remove(java.lang.Object o)
          Removes one instance of the specified element.
 int size()
          Returns the number of elements in this collection.
 java.lang.Object[] toArray()
          Returns an array containing all of the elements in this collection.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SortedSetImpl

public SortedSetImpl()
Default Constructor, creates an empty Set, according to the elements' natural order.
Method Detail

add

public boolean add(java.lang.Object o)
Description copied from interface: Collection
Adds an element.
See Also:
interface

isEmpty

public boolean isEmpty()
Description copied from interface: Collection
Checks if the collection contains elements.
See Also:
interface

remove

public boolean remove(java.lang.Object o)
Description copied from interface: Collection
Removes one instance of the specified element.
See Also:
interface

iterator

public Iterator iterator()
Description copied from interface: Collection
Returns an iterator over the elements in this collection. There are no guarantees concerning the order in which the elements are returned.
See Also:
interface

toArray

public java.lang.Object[] toArray()
Description copied from interface: Collection
Returns an array containing all of the elements in this collection.
See Also:
interface

size

public int size()
Description copied from interface: Collection
Returns the number of elements in this collection.
See Also:
interface

first

public java.lang.Object first()
Description copied from interface: SortedSet
Returns the first (lowest) element currently in this sorted set.
Specified by:
first in interface SortedSet
See Also:
interface