|
J-Sim v1.2.1-p7 API | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectdrcl.DrclObj
drcl.util.scalar.LongSpace
A long integer space.
| Constructor Summary | |
LongSpace()
|
|
LongSpace(long start_,
long end_)
|
|
| Method Summary | |
void |
checkin(long which_)
|
void |
checkin(long start_,
long end_)
Check in a range of long integers. |
long |
checkout()
Check out the first available long integer from the space. |
long |
checkout(long code_)
Check out a long integer, given a preference. |
void |
checkout(long start_,
long end_)
Check out a range of long integers. |
long |
checkoutGreater(long code_)
Check out the smallest long integer that is greater than or equal to code_ |
long |
checkoutSmaller(long code_)
Check out the greatest long integer that is smaller than or equal to code_ |
void |
checkoutUntil(long end_)
Check out all long integers before the specified one. |
void |
clear()
|
boolean |
contains(long code_)
Returns true if the long integer is in the space. |
boolean |
contains(long start_,
long 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(LongSpace that_)
|
java.util.Iterator |
getGapIterator()
Returns the iterator that iterates the gaps in this space. |
java.util.Iterator |
getGapIterator(long 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(long start_)
Returns the iterator that iterates the intervals in this space. |
LongInterval |
getLongInterval(int index_)
|
LongInterval[] |
getLongIntervals()
|
long |
getSize()
Returns the number of long integers in this space. |
long |
getSize(long start_,
long end_)
Returns the number of long integers in this space that are in the specified range. |
long |
getSizeUpTo(long end_)
Returns the number of long integers in this space that are smaller than the specified one. |
long |
getSmallest()
Returns the first available long integer in the space. |
java.lang.String |
info()
|
void |
intersectedWith(LongSpace that_)
|
boolean |
isIntersectedWith(long start_,
long end_)
Returns true if the intersection of the range and this space is not empty. |
LongInterval |
nextGap(long start_)
Returns next gap starting greater than or equal to start_. |
LongInterval |
nextInterval(long start_)
Returns next interval starting greater than or equal to start_. |
int |
numOfLongIntervals()
|
void |
reset()
|
void |
reset(long start,
long end)
|
void |
shiftedBy(long shift_)
Shifts all the intervals in the space by shift_. |
boolean |
strictlyContains(long start_,
long end_)
Returns true if the range is covered in this space but not one of the constituent blocks. |
void |
takesUnionWith(LongSpace 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 LongSpace()
public LongSpace(long start_,
long end_)
| Method Detail |
public void reset()
public void reset(long start,
long 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 interface ObjectDuplicableduplicate in class DrclObjpublic java.lang.String toString()
toString in class DrclObjpublic java.lang.String info()
public int numOfLongIntervals()
public long getSmallest()
java.lang.Long.MIN_VALUE if the set is empty.public LongInterval[] getLongIntervals()
public LongInterval getLongInterval(int index_)
public long checkout()
java.lang.Long.MIN_VALUE if the set is empty.public long checkout(long code_)
java.lang.Long.MIN_VALUE if code_ is not in the space.
public void checkout(long start_,
long end_)
start_ - start of the range, inclusive.end_ - end of the range, exclusive.public void checkoutUntil(long end_)
end_ - end of the range, exclusive.public long checkoutGreater(long code_)
code_.
- Returns:
java.lang.Long.MIN_VALUE if none is available.
public long checkoutSmaller(long code_)
code_.
- Returns:
java.lang.Long.MAX_VALUE if none is available.
public void checkin(long which_)
public void checkin(long start_,
long end_)
start_ - start of the range, inclusive.end_ - end of the range, exclusive.public void takesUnionWith(LongSpace that_)
public void excludes(LongSpace that_)
public void intersectedWith(LongSpace that_)
public void shiftedBy(long shift_)
shift_.
public LongInterval nextInterval(long start_)
start_.
The returned interval may be shared by this space, modifying it alters this space.
public LongInterval nextGap(long start_)
start_.
public boolean contains(long code_)
public boolean contains(long start_,
long end_)
start_ - start of the range, inclusive.end_ - end of the range, exclusive.
public boolean strictlyContains(long start_,
long end_)
start_ - start of the range, inclusive.end_ - end of the range, exclusive.
public boolean isIntersectedWith(long start_,
long end_)
start_ - start of the range, inclusive.end_ - end of the range, exclusive.public long getSize()
public long getSize(long start_,
long end_)
start_ - start of the range, inclusive.end_ - end of the range, exclusive.public long getSizeUpTo(long end_)
end_ - end of the range, exclusive.public java.util.Iterator getIntervalIterator()
public java.util.Iterator getIntervalIterator(long start_)
start_ does not count.
public java.util.Iterator getGapIterator()
public java.util.Iterator getGapIterator(long start_)
start_ does not count.
|
J-Sim v1.2.1-p7 API | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||