il.ac.tau.cs.software1.set
Class BinaryOpSortedSet<T extends java.lang.Comparable<T>>

java.lang.Object
  extended by il.ac.tau.cs.software1.set.BinaryOpSortedSet<T>
All Implemented Interfaces:
SortedSet<T>

public abstract class BinaryOpSortedSet<T extends java.lang.Comparable<T>>
extends java.lang.Object
implements SortedSet<T>


Constructor Summary
BinaryOpSortedSet()
           
 
Method Summary
 T getMaximum()
          Returns the maximal (highest) element in this set.
 T getMinimum()
          Returns the minimal (lowest) element in this set.
 boolean isEmpty()
          Returns true if this set contains no elements.
 int size()
          Returns the number of elements in this set (its cardinality).
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface il.ac.tau.cs.software1.set.SortedSet
contains, iterator
 

Constructor Detail

BinaryOpSortedSet

public BinaryOpSortedSet()
Method Detail

size

public int size()
Description copied from interface: SortedSet
Returns the number of elements in this set (its cardinality).

Specified by:
size in interface SortedSet<T extends java.lang.Comparable<T>>
Returns:
the number of elements in this set (its cardinality)

getMaximum

public T getMaximum()
Description copied from interface: SortedSet
Returns the maximal (highest) element in this set.

Specified by:
getMaximum in interface SortedSet<T extends java.lang.Comparable<T>>
Returns:
the maximal (highest) element in this set

getMinimum

public T getMinimum()
Description copied from interface: SortedSet
Returns the minimal (lowest) element in this set.

Specified by:
getMinimum in interface SortedSet<T extends java.lang.Comparable<T>>
Returns:
the minimal (lowest) element in this set

isEmpty

public boolean isEmpty()
Description copied from interface: SortedSet
Returns true if this set contains no elements.

Specified by:
isEmpty in interface SortedSet<T extends java.lang.Comparable<T>>
Returns:
true if this set contains no elements