|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectil.ac.tau.cs.sw1.sortedset.eager.BinaryOpSortedSet<T>
public abstract class BinaryOpSortedSet<T extends java.lang.Comparable<T>>
Constructor Summary | |
---|---|
BinaryOpSortedSet(SortedSet<T> setA,
SortedSet<T> setB)
Constructs a new CompositeSortedSet from two preexisting sets |
Method Summary | |
---|---|
boolean |
contains(T element)
Return true if this set contains the specified element. |
T |
getMaximum()
Return the maximal (highest) element in this set. |
T |
getMinimum()
Return the minimal (lowest) element in this set. |
boolean |
isEmpty()
Return true if this set contains no elements. |
SortedIterator<T> |
iterator()
Return an iterator over the elements of this set. |
int |
size()
Return 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 |
Constructor Detail |
---|
public BinaryOpSortedSet(SortedSet<T> setA, SortedSet<T> setB)
setA
- - the first set in the compositionsetB
- - the second set in the compositionMethod Detail |
---|
public int size()
SortedSet
size
in interface SortedSet<T extends java.lang.Comparable<T>>
public boolean contains(T element)
SortedSet
true
if this set contains the specified element.
contains
in interface SortedSet<T extends java.lang.Comparable<T>>
true
if this set contains the specified elementpublic T getMaximum()
SortedSet
getMaximum
in interface SortedSet<T extends java.lang.Comparable<T>>
public T getMinimum()
SortedSet
getMinimum
in interface SortedSet<T extends java.lang.Comparable<T>>
public boolean isEmpty()
SortedSet
true
if this set contains no elements.
isEmpty
in interface SortedSet<T extends java.lang.Comparable<T>>
true
if this set contains no elementspublic SortedIterator<T> iterator()
SortedSet
iterator
in interface SortedSet<T extends java.lang.Comparable<T>>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |