Constructor and Description |
---|
FiniteSet(java.util.Set set)
Constructs a finite set.
|
Modifier and Type | Method and Description |
---|---|
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.
|
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.
|
public FiniteSet(java.util.Set set)
set
- a set of elementspublic boolean equals(java.lang.Object s)
equals
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