jds
Interface Set

All Known Implementing Classes:
SetAdapter, SortedList

public abstract interface Set
extends Bag

Set - union/intersection/difference of collections of values; for use with book Classic Data Structures in Java by Timothy A Budd, published by Addison-Wesley, 2001.

See Also:
Bag

Fields inherited from class java.io.Serializable
serialVersionUID
 
Method Summary
 void differenceWith(Bag aSet)
          form difference from argument set
 void intersectWith(Bag aSet)
          form intersection with argument set
 boolean subsetOf(Bag aSet)
          see if current set is subset of argument set
 void unionWith(Bag aSet)
          form union with argument set
 
Methods inherited from interface jds.Bag
addElement, containsElement, findElement, removeElement
 
Methods inherited from interface jds.Collection
elements, isEmpty, size
 

Method Detail

unionWith

public void unionWith(Bag aSet)
form union with argument set
Parameters:
aSet - collection to be joined to current

intersectWith

public void intersectWith(Bag aSet)
form intersection with argument set
Parameters:
aSet - collection to be intersected with current

differenceWith

public void differenceWith(Bag aSet)
form difference from argument set
Parameters:
aSet - collection to be compared to current

subsetOf

public boolean subsetOf(Bag aSet)
see if current set is subset of argument set
Parameters:
aSet - collection to be tested against
Returns:
true if current collection is subset of argument collection