|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object JSci.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 elementsMethod Detail |
---|
public boolean equals(java.lang.Object s)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public java.util.Set getElements()
public int cardinality()
cardinality
in interface MathSet
public MathSet union(MathSet set)
union
in interface MathSet
set
- a set.
public MathSet intersect(MathSet set)
intersect
in interface MathSet
set
- a set.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |