structure
Interface Set

All Superinterfaces:
Structure
All Known Implementing Classes:
AbstractSet, SetList, SetVector

public interface Set
extends Structure

Implementation of a set of elements. As with the mathematical object, the elements of the set are not duplicated. No order is implied or enforced in this structure.


Method Summary
 void addAll(Structure other)
          Union other set into this set.
 boolean containsAll(Structure other)
          Check to see if this set is contained in the other structure.
 void removeAll(Structure other)
          Computes the difference between this set and the other structure
 void retainAll(Structure other)
          Computes the intersection between this set and the other structure.
 
Methods inherited from interface structure.Structure
add, clear, contains, elements, isEmpty, iterator, remove, size, values
 

Method Detail

addAll

void addAll(Structure other)
Union other set into this set.

Precondition:
other is non-null
Postcondition:
values from other are added into this set

containsAll

boolean containsAll(Structure other)
Check to see if this set is contained in the other structure.

Precondition:
other is non-null
Postcondition:
returns true if every value in set is in other

removeAll

void removeAll(Structure other)
Computes the difference between this set and the other structure

Precondition:
other is non-null
Postcondition:
values of this set contained in other are removed

retainAll

void retainAll(Structure other)
Computes the intersection between this set and the other structure.

Precondition:
other is non-null
Postcondition:
values not appearing in the other structure are removed