Interface SortedSet<T>

All Known Implementing Classes:
ArithmeticSeriesSet, CompositeSortedSet

public interface SortedSet<T>

An interface for a set of elements, whose iterator returns the elements in ascending order


Method Summary
 boolean contains(T element)
          Return a boolean expression if this set contains the given element.
 T getMaximum()
          Return the maximum element in this set.
 T getMinimum()
          Return the mimimum element in this set.
 boolean isEmpty()
          Return true iff the set is empty.
 SortedIterator<T> iterator()
          Returns an Iterator for the elements of this set.
 int size()
          Return the power of this set, i.e the number of elements in the set.
 

Method Detail

size

int size()
Return the power of this set, i.e the number of elements in the set.

Returns:
the power of this set, i.e the number of elements in the set

contains

boolean contains(T element)
Return a boolean expression if this set contains the given element.

Returns:
a boolean expression if this set contains the given element

isEmpty

boolean isEmpty()
Return true iff the set is empty.

Returns:
true iff the set is empty

getMinimum

T getMinimum()
Return the mimimum element in this set.

Returns:
the mimimum element in this set

getMaximum

T getMaximum()
Return the maximum element in this set.

Returns:
the maximum element in this set

iterator

SortedIterator<T> iterator()
Returns an Iterator for the elements of this set.

Returns:
An Iterator for the elements of this set