Class JSci.maths.Set
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class JSci.maths.Set

java.lang.Object
   |
   +----JSci.maths.Set

public class Set
extends Object
The Set class provides an encapsulation for sets.

Variable Index

 o elements
The set elements.

Constructor Index

 o Set()
Constructs a set.
 o Set(Object[])
Constructs a set.

Method Index

 o getElement(int)
Returns an element from within the set.
 o intersection(Set)
Performs the intersection of this set with another.
 o size()
Returns the number of elements in the set.
 o union(Set)
Performs the union of this set with another.

Variables

 o elements
  protected Object elements[]
The set elements.

Constructors

 o Set
  protected Set()
Constructs a set.
 o Set
  public Set(Object array[])
Constructs a set.
Parameters:
array - an array containing the set elements

Methods

 o size
  public final int size()
Returns the number of elements in the set.
 o getElement
  public final Object getElement(int n)
Returns an element from within the set.
Parameters:
n - index of the element
 o union
  public Set union(Set s)
Performs the union of this set with another.
Parameters:
s - a set
Returns:
the union of the two sets
 o intersection
  public Set intersection(Set s)
Performs the intersection of this set with another.
Parameters:
s - a set
Returns:
the intersection of the two sets

All Packages  Class Hierarchy  This Package  Previous  Next  Index