|
DRCL JavaSim API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--drcl.DrclObj
|
+--drcl.util.scalar.IntSpace
An integer space.
| Constructor Summary | |
IntSpace()
|
|
IntSpace(int start_,
int end_)
|
|
| Method Summary | |
void |
checkin(int which_)
|
void |
checkin(int start_,
int end_)
Check in a range of integers. |
int |
checkout()
Check out the first available integer from the space. |
int |
checkout(int code_)
Check out an integer, given a preference. |
void |
checkout(int start_,
int end_)
Check out a range of integers. |
int |
checkoutGreater(int code_)
Check out the smallest integer that is greater than or equal to code_ |
int |
checkoutSmaller(int code_)
Check out the greatest integer that is smaller than or equal to code_ |
void |
checkoutUntil(int end_)
Check out all integers before the specified one. |
void |
clear()
|
boolean |
contains(int code_)
Returns true if the integer is in the space. |
boolean |
contains(int start_,
int end_)
Returns true if the range is covered in the space. |
void |
duplicate(java.lang.Object source_)
opies the content of the source_ object to this object. |
void |
excludes(IntSpace that_)
|
java.util.Iterator |
getGapIterator()
Returns the iterator that iterates the gaps in this space. |
java.util.Iterator |
getGapIterator(int start_)
Returns the iterator that iterates the gaps in this space. |
java.util.Iterator |
getIntervalIterator()
Returns the iterator that iterates the intervals in this space. |
java.util.Iterator |
getIntervalIterator(int start_)
Returns the iterator that iterates the intervals in this space. |
IntInterval[] |
getIntIntervals()
|
int |
getSize()
Returns the number of integers in this space. |
int |
getSize(int start_,
int end_)
Returns the number of integers in this space that are in the specified range. |
int |
getSizeUpTo(int end_)
Returns the number of integers in this space that are smaller than the specified one. |
int |
getSmallest()
Returns the first available integer in the space. |
java.lang.String |
info()
|
void |
intersectedWith(IntSpace that_)
|
boolean |
isIntersectedWith(int start_,
int end_)
Returns true if the intersection of the range and this space is not empty. |
IntInterval |
nextGap(int start_)
Returns next gap starting greater than or equal to start_. |
IntInterval |
nextInterval(int start_)
Returns next interval starting greater than or equal to start_. |
int |
numOfIntIntervals()
|
void |
reset()
|
void |
reset(int start,
int end)
|
void |
shiftedBy(int shift_)
Shifts all the intervals in the space by shift_. |
boolean |
strictlyContains(int start_,
int end_)
Returns true if the range is covered in the space but is not one of the constituent blocks. |
void |
takesUnionWith(IntSpace that_)
|
java.lang.String |
toString()
|
| Methods inherited from class drcl.DrclObj |
clone |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public IntSpace()
public IntSpace(int start_,
int end_)
| Method Detail |
public void reset()
public void reset(int start,
int end)
public void clear()
public void duplicate(java.lang.Object source_)
DrclObjsource_ object to this object.
he subclass must implement this method to realize DrclObj.clone().duplicate in class DrclObjpublic java.lang.String toString()
toString in class DrclObjpublic java.lang.String info()
public int numOfIntIntervals()
public int getSmallest()
java.lang.Integer.MIN_VALUE if the set is empty.public IntInterval[] getIntIntervals()
public int checkout()
java.lang.Integer.MIN_VALUE if the set is empty.public int checkout(int code_)
java.lang.Integer.MIN_VALUE if code_ is not in the space.
public void checkout(int start_,
int end_)
start_ - start of the range, inclusive.end_ - end of the range, exclusive.public void checkoutUntil(int end_)
end_ - end of the range, exclusive.public int checkoutGreater(int code_)
code_.
- Returns:
java.lang.Integer.MIN_VALUE if none is available.
public int checkoutSmaller(int code_)
code_.
- Returns:
java.lang.Integer.MAX_VALUE if none is available.
public void checkin(int which_)
public void checkin(int start_,
int end_)
start_ - start of the range, inclusive.end_ - end of the range, exclusive.public void takesUnionWith(IntSpace that_)
public void excludes(IntSpace that_)
public void intersectedWith(IntSpace that_)
public void shiftedBy(int shift_)
shift_.public IntInterval nextInterval(int start_)
start_.
The returned interval may be shared by this space, modifying it alters this space.public IntInterval nextGap(int start_)
start_.public boolean contains(int code_)
public boolean contains(int start_,
int end_)
start_ - start of the range, inclusive.end_ - end of the range, exclusive.
public boolean strictlyContains(int start_,
int end_)
start_ - start of the range, inclusive.end_ - end of the range, exclusive.
public boolean isIntersectedWith(int start_,
int end_)
start_ - start of the range, inclusive.end_ - end of the range, exclusive.public int getSize()
public int getSize(int start_,
int end_)
start_ - start of the range, inclusive.end_ - end of the range, exclusive.public int getSizeUpTo(int end_)
end_ - end of the range, exclusive.public java.util.Iterator getIntervalIterator()
public java.util.Iterator getIntervalIterator(int start_)
start_ does not count.public java.util.Iterator getGapIterator()
public java.util.Iterator getGapIterator(int start_)
start_ does not count.
|
DRCL JavaSim API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||