|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jscience.mathematics.FiniteSet
public final class FiniteSet
A set containing a finite number of elements. This class provides a
bridge between java.util.Set and
org.jscience.mathematics.Set.
| Field Summary | |
|---|---|
static FiniteSet |
EMPTY
DOCUMENT ME! |
| Constructor Summary | |
|---|---|
FiniteSet(FiniteSet set)
Constructs a finite set. |
|
FiniteSet(java.lang.Object elem)
Constructs a finite set. |
|
| Method Summary | |
|---|---|
int |
cardinality()
Returns the cardinality. |
boolean |
contains(java.lang.Object o)
Returns true if this set contains the specified element. |
boolean |
equals(java.lang.Object s)
Compares the specified object with this set for equality. |
java.util.Set |
getElements()
Returns the elements of this set. |
int |
hashCode()
Returns the hash code value for this set. |
Set |
intersection(Set set)
Performs the intersection of this set with another. |
boolean |
isEmpty()
Returns true if this set contains no elements. |
java.util.Iterator |
iterator()
Returns an iterator over the elements in this set. |
boolean |
remove(java.lang.Object o)
Removes the specified element from this set if it is present (optional operation). |
java.lang.Object[] |
toArray()
Returns an array containing all of the elements in this set. |
java.lang.String |
toString()
Returns a string representing this set. |
Set |
union(Set set)
Performs the union of this set with another. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final FiniteSet EMPTY
| Constructor Detail |
|---|
public FiniteSet(FiniteSet set)
set - a set of elementspublic FiniteSet(java.lang.Object elem)
elem - a element for the set| Method Detail |
|---|
public int cardinality()
cardinality in interface Setpublic boolean isEmpty()
isEmpty in interface Setpublic Set union(Set set)
union in interface Setset - a set.
public Set intersection(Set set)
intersection in interface Setset - a set.
public boolean contains(java.lang.Object o)
contains in interface Seto - - element whose presence in this set is to be tested.
public boolean remove(java.lang.Object o)
remove in interface Seto - - object to be removed from this set, if present.
public boolean equals(java.lang.Object s)
equals in interface Setequals in class java.lang.Objects - - Object to be compared for equality with this set.
public int hashCode()
hashCode in interface SethashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Objectpublic java.util.Iterator iterator()
iterator in interface Setpublic java.util.Set getElements()
public java.lang.Object[] toArray()
toArray in interface Set
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||