il.ac.tau.cs.sw1.sortedset.lazy
Class UnionSortedSet<T extends java.lang.Comparable<T>>

java.lang.Object
  extended by il.ac.tau.cs.sw1.sortedset.lazy.BinaryOpSortedSet<T>
      extended by il.ac.tau.cs.sw1.sortedset.lazy.UnionSortedSet<T>
All Implemented Interfaces:
SortedSet<T>

public class UnionSortedSet<T extends java.lang.Comparable<T>>
extends BinaryOpSortedSet<T>


Constructor Summary
UnionSortedSet(SortedSet<T> setA, SortedSet<T> setB)
           
 
Method Summary
 boolean contains(T element)
          Return true if this set contains the specified element.
 SortedIterator<T> iterator()
          Return an iterator over the elements of this set.
 
Methods inherited from class il.ac.tau.cs.sw1.sortedset.lazy.BinaryOpSortedSet
getMaximum, getMinimum, isEmpty, size
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UnionSortedSet

public UnionSortedSet(SortedSet<T> setA,
                      SortedSet<T> setB)
Method Detail

contains

public boolean contains(T element)
Description copied from interface: SortedSet
Return true if this set contains the specified element.

Returns:
true if this set contains the specified element

iterator

public SortedIterator<T> iterator()
Description copied from interface: SortedSet
Return an iterator over the elements of this set. The elements are returned in ascending order.

Returns:
an iterator over the elements in this set