|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectjopt.csp.util.DoubleSet
jopt.csp.util.DoubleSparseSet
A sorted set of individual double values
| Constructor Summary | |
DoubleSparseSet()
Creates a new set |
|
| Method Summary | |
void |
add(double val)
Adds a value to set |
void |
add(double start,
double end)
Inherited method that doesn't make sense with a sparse set. |
void |
clear()
Removes all values from the set |
java.lang.Object |
clone()
Creates a duplicate of this set |
boolean |
contains(double val)
Returns true if value is contained in set |
DoubleSparseSetListener |
getListener()
Returns listener that is currently assigned to set |
double |
getMax()
Returns maximum value for set |
double |
getMin()
Returns minimum value for set |
double |
getNextHigher(double val)
Returns the next higher value in the domain or current value if none exists |
double |
getNextLower(double val)
Returns the next lower value in the domain or current value if none exists |
void |
remove(double val)
Removes a value from the set |
void |
remove(double start,
double end)
Removes a range of values from the set |
void |
removeEndingAt(double val)
Removes all values below and including given value |
void |
removeEndingBefore(double val)
Removes all values below given value |
void |
removeStartingAfter(double val)
Removes all values above given value |
void |
removeStartingFrom(double val)
Removes all values above and including given value |
void |
setListener(DoubleSparseSetListener listener,
int callback)
Sets listener for set to be notified of changes |
int |
size()
Returns the size of the set |
java.lang.String |
toString()
|
NumberIterator |
values()
returns an iterator containing all numbers in the set |
| Methods inherited from class jopt.csp.util.DoubleSet |
addAll, removeAll, retainAll |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public DoubleSparseSet()
| Method Detail |
public final int size()
public void clear()
clear in interface NumSetclear in class DoubleSetpublic double getMin()
getMin in class DoubleSetpublic double getMax()
getMax in class DoubleSetpublic boolean contains(double val)
contains in class DoubleSetpublic void add(double val)
add in class DoubleSet
public void add(double start,
double end)
add in class DoubleSetpublic void remove(double val)
DoubleSet
remove in class DoubleSet
public void remove(double start,
double end)
DoubleSet
remove in class DoubleSetpublic void removeStartingFrom(double val)
DoubleSet
removeStartingFrom in class DoubleSetpublic void removeStartingAfter(double val)
DoubleSet
removeStartingAfter in class DoubleSetpublic void removeEndingAt(double val)
DoubleSet
removeEndingAt in class DoubleSetpublic void removeEndingBefore(double val)
DoubleSet
removeEndingBefore in class DoubleSetpublic double getNextHigher(double val)
getNextHigher in class DoubleSetpublic double getNextLower(double val)
getNextLower in class DoubleSetpublic java.lang.Object clone()
clone in interface NumSetclone in class DoubleSet
public void setListener(DoubleSparseSetListener listener,
int callback)
public DoubleSparseSetListener getListener()
public NumberIterator values()
public java.lang.String toString()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||