All Packages Class Hierarchy This Package Previous Next Index
Interface structure.Set
 public interface Set
 extends Collection
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.

difference(Set)
 Compute the difference between two sets.

intersection(Set)
 Compute the intersection of this set and other.

subset(Set)
 Determine if this set is a subset of other.

union(Set)
 Compute the union of this set with other.
subset
public abstract boolean subset(Set other)
 Determine if this set is a subset of other.
 Precondition:
 other is nonnull reference to set
 Postcondition:
 returns true iff this set is subset of other
 Parameters:
 other  The potential superset.
union
public abstract Object union(Set other)
 Compute the union of this set with other.
This set not modified.
 Precondition:
 other is nonnull reference to set
 Postcondition:
 returns new set containing union of this and other
 Parameters:
 other  The set to be unioned with this.
 Returns:
 Union of this and other.
intersection
public abstract Object intersection(Set other)
 Compute the intersection of this set and other.
Members of result are in both this and other.
 Precondition:
 other is nonnull reference to set
 Postcondition:
 returns new set containing intersection of this and other
 Parameters:
 other  The other set to be intersected with this.
 Returns:
 Intersection of this and other.
difference
public abstract Object difference(Set other)
 Compute the difference between two sets.
Values of the result are members of this, but not other.
 Precondition:
 other is nonnull reference to set
 Postcondition:
 returns new set containing difference of this and other
 Parameters:
 other  The set whose values are to be eliminated from this.
 Returns:
 Difference between this and other.
All Packages Class Hierarchy This Package Previous Next Index