jsci.maths
Class FiniteSet
- java.lang.Object
-
- jsci.maths.FiniteSet
-
-
Constructor Summary
Constructors Constructor and Description FiniteSet(java.util.Set set)Constructs a finite set.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description intcardinality()Returns the cardinality.booleanequals(java.lang.Object s)Compares two sets for equality.java.util.SetgetElements()Returns the elements of this set.inthashCode()MathSetintersect(MathSet set)Performs the intersection of this set with another.java.lang.StringtoString()Returns a string representing this set.MathSetunion(MathSet set)Performs the union of this set with another.
-
-
-
Constructor Detail
-
FiniteSet
public FiniteSet(java.util.Set set)
Constructs a finite set.- Parameters:
set- a set of elements
-
-
Method Detail
-
equals
public boolean equals(java.lang.Object s)
Compares two sets for equality.- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
Returns a string representing this set.- Overrides:
toStringin classjava.lang.Object
-
getElements
public java.util.Set getElements()
Returns the elements of this set.
-
cardinality
public int cardinality()
Returns the cardinality.- Specified by:
cardinalityin interfaceMathSet
-
-
DMelt 3.0 © DataMelt by jWork.ORG