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.
-
elements
- The set elements.
-
Set()
- Constructs a set.
-
Set(Object[])
- Constructs a set.
-
getElement(int)
- Returns an element from within the set.
-
intersection(Set)
- Performs the intersection of this set with another.
-
size()
- Returns the number of elements in the set.
-
union(Set)
- Performs the union of this set with another.
elements
protected Object elements[]
- The set elements.
Set
protected Set()
- Constructs a set.
Set
public Set(Object array[])
- Constructs a set.
- Parameters:
- array - an array containing the set elements
size
public final int size()
- Returns the number of elements in the set.
getElement
public final Object getElement(int n)
- Returns an element from within the set.
- Parameters:
- n - index of the element
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
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