|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.emory.mathcs.util.collections.longs.AbstractLongCollection
edu.emory.mathcs.util.collections.longs.AbstractLongSet
edu.emory.mathcs.util.collections.longs.AbstractLongSortedSet
edu.emory.mathcs.util.collections.longs.AbstractLongInterval
Base class for (possibly mutable) interval classes.
| Nested Class Summary | |
protected static class |
AbstractLongInterval.ComplementView
|
protected static class |
AbstractLongInterval.ConstrainedView
|
static class |
AbstractLongInterval.SimpleIntervalItemIterator
|
static class |
AbstractLongInterval.SimpleReverseIntervalItemIterator
|
| Nested classes inherited from class edu.emory.mathcs.util.collections.longs.AbstractLongSortedSet |
AbstractLongSortedSet.AbstractComplementSubView, AbstractLongSortedSet.AbstractSubView, AbstractLongSortedSet.ForwardIntervalItemIterator, AbstractLongSortedSet.ReverseIntervalItemIterator |
| Constructor Summary | |
AbstractLongInterval()
|
|
| Method Summary | |
boolean |
addInterval(long first,
long last)
Adds to this set all the numbers between first and last, inclusive, that are not already present in this set and belong to this set's domain. |
long |
ceiling(long e)
Returns the smallest number in this set >= e. |
LongInterval |
ceilingInterval(long n)
Returns the smallest (left-most), widest interval contained in this set which elements are not all smaller than the specified number. |
void |
clear()
Removes all of the elements from this set. |
LongSet |
complementSet()
Returns a complement view of this set. |
boolean |
contains(long e)
Returns true if this set contains the specified number; false otherwise. |
boolean |
containsInterval(long first,
long last)
Returns true if this set contains all the numbers between first and last, inclusive; false otherwise. |
java.util.Iterator |
descendingIntervalIterator()
Returns an iterator over intervals of this set, in a decreasing numerical order. |
LongIterator |
descendingIterator()
Returns an iterator over numbers in this set, in a decreasing numerical order. |
LongInterval |
enclosingInterval(long e)
Returns the widest interval contained in this set that includes the specified number, or null if this set does not include the specified number. |
long |
first()
Returns the smallest number in this set. |
LongInterval |
firstInterval()
Returns the first (left-most), widest interval contained in this set, or null if this set is empty. |
long |
floor(long e)
Returns the largest number in this set <= e. |
LongInterval |
floorInterval(long n)
Returns the largest (right-most), widest interval contained in this set which elements are not all greater than the specified number. |
protected abstract long |
getFirst()
|
protected abstract long |
getLast()
|
long |
higher(long e)
Returns the smallest number in this set > e. |
LongInterval |
higherInterval(long n)
Returns the smallest (left-most), widest interval contained in this set which all elements are strictly greater than the specified number. |
int |
intervalCount()
Returns the minimum count of intervals into which this set can be decomposed. |
java.util.Iterator |
intervalIterator()
Returns an iterator over intervals of this set, in an increasing numerical order. |
boolean |
isEmpty()
Returns true if this set is empty; false otherwise. |
LongIterator |
iterator()
Returns an iterator over numbers in this set, in an increasing numerical order. |
long |
last()
Returns the largest number in this set. |
LongInterval |
lastInterval()
Returns the last (right-most), widest interval contained in this set, or null if this set is empty. |
long |
lower(long e)
Returns the largest number in this set < e. |
LongInterval |
lowerInterval(long n)
Returns the largest and widest interval contained in this set which all elements are strictly less than the specified number. |
long |
max()
The largest number that can be stored in this set. |
long |
min()
The smallest number that can be stored in this set. |
long |
pollFirst()
Returns and removes the smallest number in this set. |
LongInterval |
pollFirstInterval()
Returns and removes the first (left-most), widest interval contained in this set, or null if this set is empty. |
long |
pollLast()
Returns and removes the largest number in this set. |
LongInterval |
pollLastInterval()
Returns and removes the last (right-most), widest interval contained in this set, or null if this set is empty. |
boolean |
removeInterval(long first,
long last)
Removes from this set all the numbers between first and last, inclusive. |
boolean |
retainInterval(long first,
long last)
Retains in this set only the numbers between first and last, inclusive. |
long |
size64()
// PREPROC: Long,Int only Returns the number of elements in this set. |
LongSortedSet |
subSet(long first,
long last)
A subset view containing all elements from this set between first, inclusive, and last, inclusive. |
java.lang.String |
toString()
|
| Methods inherited from class edu.emory.mathcs.util.collections.longs.AbstractLongSortedSet |
headSet, retainAll, tailSet, toCompactString |
| Methods inherited from class edu.emory.mathcs.util.collections.longs.AbstractLongSet |
addAll, equals, hashCode, removeAll |
| Methods inherited from class edu.emory.mathcs.util.collections.longs.AbstractLongCollection |
add, containsAll, remove, size, toArray, toArray |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface edu.emory.mathcs.util.collections.longs.LongSortedSet |
headSet, tailSet, toCompactString |
| Methods inherited from interface edu.emory.mathcs.util.collections.longs.LongSet |
add, addAll, containsAll, equals, hashCode, remove, removeAll, retainAll, size, toArray, toArray |
| Constructor Detail |
public AbstractLongInterval()
| Method Detail |
protected abstract long getFirst()
protected abstract long getLast()
public long min()
LongSet
min in interface LongSetmin in class AbstractLongSetpublic long max()
LongSet
max in interface LongSetmax in class AbstractLongSetpublic long first()
LongSortedSet
first in interface LongSortedSetfirst in class AbstractLongSortedSetpublic long last()
LongSortedSet
last in interface LongSortedSetlast in class AbstractLongSortedSetpublic int intervalCount()
LongSortedSet
intervalCount in interface LongSortedSetintervalCount in class AbstractLongSortedSetpublic LongInterval firstInterval()
LongSortedSet
firstInterval in interface LongSortedSetfirstInterval in class AbstractLongSortedSetpublic LongInterval lastInterval()
LongSortedSet
lastInterval in interface LongSortedSetlastInterval in class AbstractLongSortedSetpublic LongInterval lowerInterval(long n)
LongSortedSet
lowerInterval in interface LongSortedSetpublic LongInterval floorInterval(long n)
LongSortedSet
floorInterval in interface LongSortedSetpublic LongInterval higherInterval(long n)
LongSortedSet
higherInterval in interface LongSortedSetpublic LongInterval ceilingInterval(long n)
LongSortedSet
ceilingInterval in interface LongSortedSetpublic long size64()
LongSet
size64 in interface LongSetsize64 in class AbstractLongSortedSetpublic boolean isEmpty()
LongSet
isEmpty in interface LongSetisEmpty in class AbstractLongSortedSetpublic boolean contains(long e)
LongSet
contains in interface LongSetcontains in class AbstractLongCollectionpublic long higher(long e)
LongSortedSet
higher in interface LongSortedSethigher in class AbstractLongSortedSetpublic long ceiling(long e)
LongSortedSet
ceiling in interface LongSortedSetceiling in class AbstractLongSortedSetpublic long lower(long e)
LongSortedSet
lower in interface LongSortedSetlower in class AbstractLongSortedSetpublic long floor(long e)
LongSortedSet
floor in interface LongSortedSetfloor in class AbstractLongSortedSet
public boolean containsInterval(long first,
long last)
LongSet
containsInterval in interface LongSetcontainsInterval in class AbstractLongSetpublic LongInterval enclosingInterval(long e)
LongSortedSet
enclosingInterval in interface LongSortedSetpublic LongIterator iterator()
LongSortedSet
iterator in interface LongSortedSetiterator in class AbstractLongSortedSetpublic LongIterator descendingIterator()
LongSortedSet
descendingIterator in interface LongSortedSetdescendingIterator in class AbstractLongSortedSetpublic java.util.Iterator intervalIterator()
LongSortedSet
intervalIterator in interface LongSortedSetpublic java.util.Iterator descendingIntervalIterator()
LongSortedSet
descendingIntervalIterator in interface LongSortedSetpublic void clear()
LongSet
clear in interface LongSetclear in class AbstractLongCollection
public boolean addInterval(long first,
long last)
LongSet
addInterval in interface LongSetaddInterval in class AbstractLongSet
public boolean removeInterval(long first,
long last)
LongSet
removeInterval in interface LongSetremoveInterval in class AbstractLongSet
public boolean retainInterval(long first,
long last)
LongSet
retainInterval in interface LongSetretainInterval in class AbstractLongSortedSetpublic long pollFirst()
LongSortedSet
pollFirst in interface LongSortedSetpollFirst in class AbstractLongSortedSetpublic long pollLast()
LongSortedSet
pollLast in interface LongSortedSetpollLast in class AbstractLongSortedSetpublic LongInterval pollFirstInterval()
LongSortedSet
pollFirstInterval in interface LongSortedSetpollFirstInterval in class AbstractLongSortedSetpublic LongInterval pollLastInterval()
LongSortedSet
pollLastInterval in interface LongSortedSetpollLastInterval in class AbstractLongSortedSet
public LongSortedSet subSet(long first,
long last)
LongSortedSet
subSet in interface LongSortedSetfirst - the minimum element of this view (inclusive).last - the maximum element of this view (inclusive).
public LongSet complementSet()
LongSet
complementSet in interface LongSetcomplementSet in class AbstractLongSetpublic java.lang.String toString()
toString in interface LongSortedSettoString in class AbstractLongCollection
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||