|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
An interface to describe a subset of N.
| Inner Class Summary | |
static class |
LinearPointSet.Factory
A factory to clone LinearPoint objects, and create default ones |
static interface |
LinearPointSet.Listener
|
| Method Summary | |
void |
addListener(LinearPointSet.Listener l)
Adds Listener l to the list of Listeners that
will be notified of any changes to the model by the invocation of
their method markAsChanged with start, count arguments
coveribg all changes. |
void |
clearRegion(int start,
int length)
Ensures that all positions in the specified interval are excluded from the set |
java.lang.Object |
clone()
Necessary to allow public access to the clone method. |
boolean |
contains(int x)
Tests whether the x point is in the set. |
boolean |
contains(int start,
int length)
Tests whether the continuous subset of positions from start
to length is contained in the set. |
int |
getEnd()
Returns the first point not contained in the set. |
int |
getStart()
Returns the first point. |
int |
getWeight(int max)
Returns the number of included points up to some (optional) limit. |
void |
insertSlots(int start,
int length)
Inserts length positions before position start.
|
boolean |
isEmpty()
Returns whether the set contains at least one position. |
void |
removeListener(LinearPointSet.Listener l)
Removes Listener l from the list of Listeners that
will be notified of any changes to the model by the invocation of
their method markAsChanged with start, count arguments
coveribg all changes. |
void |
removeSlots(int start,
int length)
Removes length positions at position start |
void |
setRegion(int start,
int length)
Ensures that all positions in the specified interval are included |
| Method Detail |
public int getWeight(int max)
max - The excluded upper bound applied to this call
must be strict positive or -1
-1 means no boundubound,public boolean isEmpty()
true iff the set is not emptypublic int getStart()
getEnd()public int getEnd()
getStart()public boolean contains(int x)
x point is in the set.x - the tested point.
public boolean contains(int start,
int length)
start
to length is contained in the set.start - the start of the tested interval.length - the length of the tested interval.
public void insertSlots(int start,
int length)
length positions before position start.
The (length) new positions will be in the set only if start-1 is in the set.start - The position of insertion. Must be non-negative.length - The number of inserted positions. Must be strict positive.
public void removeSlots(int start,
int length)
length positions at position start
public void setRegion(int start,
int length)
start - The first position to include.length - The number of positions whose inclusion must be insured
public void clearRegion(int start,
int length)
start - The first position to exclude.length - The number of positions whose exclusion must be insuredpublic void addListener(LinearPointSet.Listener l)
Listener l to the list of Listeners that
will be notified of any changes to the model by the invocation of
their method markAsChanged with start, count arguments
coveribg all changes.public void removeListener(LinearPointSet.Listener l)
Listener l from the list of Listeners that
will be notified of any changes to the model by the invocation of
their method markAsChanged with start, count arguments
coveribg all changes.
public java.lang.Object clone()
throws java.lang.CloneNotSupportedException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||