|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object jopt.csp.util.FloatSet jopt.csp.util.FloatIntervalSet
A sorted set of float intervals
Constructor Summary | |
FloatIntervalSet()
Creates a new set |
Method Summary | |
void |
add(float val)
Adds a value to set |
void |
add(float start,
float end)
Adds a range of values to set |
void |
clear()
Removes all values from the set |
java.lang.Object |
clone()
Creates a duplicate of this set |
boolean |
contains(float val)
Returns true if value is contained in set |
int |
getFirstIntervalIndex()
Returns first interval index in list |
float |
getIntervalEnd(int idx)
Returns end value for interval at a given index |
float |
getIntervalStart(int idx)
Returns start value for interval at a given index |
int |
getLastIntervalIndex()
Returns the last index in list |
FloatIntervalSetListener |
getListener()
Returns listener that is currently assigned to set |
float |
getMax()
Returns maximum value for set. |
float |
getMax(int intervalIdx)
Returns the end of the interval at the specified index |
float |
getMin()
Returns minimum value for set. |
float |
getMin(int intervalIdx)
Returns the start of the interval at the specified index |
float |
getNextHigher(float val)
Returns the next higher value in the domain or current value if none exists |
int |
getNextIntervalIndex(int idx)
Returns next interval index in list |
float |
getNextLower(float val)
Returns the next lower value in the domain or current value if none exists |
int |
getPreviousIntervalIndex(int idx)
Returns previous interval index in list |
IntervalIterator |
intervals()
Returns an iterator for intervals contained in set |
void |
remove(float val)
Removes a value from the set |
void |
remove(float start,
float end)
Removes a range of values from the set |
void |
removeEndingAt(float val)
Removes all values below and including given value |
void |
removeEndingBefore(float val)
Removes all values below given value |
void |
removeStartingAfter(float val)
Removes all values above and including given value |
void |
removeStartingFrom(float val)
Removes all values above and including given value |
void |
setListener(FloatIntervalSetListener 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 values in the set |
Methods inherited from class jopt.csp.util.FloatSet |
addAll, removeAll, retainAll |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public FloatIntervalSet()
Method Detail |
public int size()
size
in interface NumSet
public void clear()
clear
in interface NumSet
clear
in class FloatSet
public int getFirstIntervalIndex()
public int getLastIntervalIndex()
public int getNextIntervalIndex(int idx)
idx
- Index previous to index that is to be foundpublic int getPreviousIntervalIndex(int idx)
idx
- Index following index that is to be foundpublic float getIntervalStart(int idx)
public float getIntervalEnd(int idx)
public float getMin()
getMin
in class FloatSet
public float getMin(int intervalIdx)
public float getMax()
getMax
in class FloatSet
public float getMax(int intervalIdx)
public boolean contains(float val)
contains
in class FloatSet
public void add(float val)
add
in class FloatSet
public void add(float start, float end)
add
in class FloatSet
public void remove(float val)
remove
in class FloatSet
public void remove(float start, float end)
remove
in class FloatSet
public final void removeStartingAfter(float val)
removeStartingAfter
in class FloatSet
public final void removeEndingBefore(float val)
removeEndingBefore
in class FloatSet
public void removeStartingFrom(float val)
removeStartingFrom
in class FloatSet
public void removeEndingAt(float val)
removeEndingAt
in class FloatSet
public float getNextHigher(float val)
getNextHigher
in class FloatSet
public float getNextLower(float val)
getNextLower
in class FloatSet
public IntervalIterator intervals()
IntervalSet
intervals
in interface IntervalSet
public NumberIterator values()
NumSet
values
in interface NumSet
public java.lang.Object clone()
clone
in interface NumSet
clone
in class FloatSet
public void setListener(FloatIntervalSetListener listener, int callback)
public FloatIntervalSetListener getListener()
public java.lang.String toString()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |