|
|||||||||||
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 NumSet
clear
in class DoubleSet
public double getMin()
getMin
in class DoubleSet
public double getMax()
getMax
in class DoubleSet
public boolean contains(double val)
contains
in class DoubleSet
public void add(double val)
add
in class DoubleSet
public void add(double start, double end)
add
in class DoubleSet
public void remove(double val)
DoubleSet
remove
in class DoubleSet
public void remove(double start, double end)
DoubleSet
remove
in class DoubleSet
public void removeStartingFrom(double val)
DoubleSet
removeStartingFrom
in class DoubleSet
public void removeStartingAfter(double val)
DoubleSet
removeStartingAfter
in class DoubleSet
public void removeEndingAt(double val)
DoubleSet
removeEndingAt
in class DoubleSet
public void removeEndingBefore(double val)
DoubleSet
removeEndingBefore
in class DoubleSet
public double getNextHigher(double val)
getNextHigher
in class DoubleSet
public double getNextLower(double val)
getNextLower
in class DoubleSet
public java.lang.Object clone()
clone
in interface NumSet
clone
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 |