|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.ObjectJSci.maths.FiniteSet
public final class FiniteSet
A set containing a finite number of elements.
This class provides a bridge between java.util.Set
and JSci.maths.MathSet.
| Constructor Summary | |
|---|---|
FiniteSet(java.util.Set set)
Constructs a finite set. |
|
| Method Summary | |
|---|---|
int |
cardinality()
Returns the cardinality. |
boolean |
equals(java.lang.Object s)
Compares two sets for equality. |
java.util.Set |
getElements()
Returns the elements of this set. |
int |
hashCode()
|
MathSet |
intersect(MathSet set)
Performs the intersection of this set with another. |
java.lang.String |
toString()
Returns a string representing this set. |
MathSet |
union(MathSet set)
Performs the union of this set with another. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public FiniteSet(java.util.Set set)
set - a set of elements| Method Detail |
|---|
public boolean equals(java.lang.Object s)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Objectpublic java.util.Set getElements()
public int cardinality()
cardinality in interface MathSetpublic MathSet union(MathSet set)
union in interface MathSetset - a set.
public MathSet intersect(MathSet set)
intersect in interface MathSetset - a set.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||