|
||||||||||
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 LongSet
min
in class AbstractLongSet
public long max()
LongSet
max
in interface LongSet
max
in class AbstractLongSet
public long first()
LongSortedSet
first
in interface LongSortedSet
first
in class AbstractLongSortedSet
public long last()
LongSortedSet
last
in interface LongSortedSet
last
in class AbstractLongSortedSet
public int intervalCount()
LongSortedSet
intervalCount
in interface LongSortedSet
intervalCount
in class AbstractLongSortedSet
public LongInterval firstInterval()
LongSortedSet
firstInterval
in interface LongSortedSet
firstInterval
in class AbstractLongSortedSet
public LongInterval lastInterval()
LongSortedSet
lastInterval
in interface LongSortedSet
lastInterval
in class AbstractLongSortedSet
public LongInterval lowerInterval(long n)
LongSortedSet
lowerInterval
in interface LongSortedSet
public LongInterval floorInterval(long n)
LongSortedSet
floorInterval
in interface LongSortedSet
public LongInterval higherInterval(long n)
LongSortedSet
higherInterval
in interface LongSortedSet
public LongInterval ceilingInterval(long n)
LongSortedSet
ceilingInterval
in interface LongSortedSet
public long size64()
LongSet
size64
in interface LongSet
size64
in class AbstractLongSortedSet
public boolean isEmpty()
LongSet
isEmpty
in interface LongSet
isEmpty
in class AbstractLongSortedSet
public boolean contains(long e)
LongSet
contains
in interface LongSet
contains
in class AbstractLongCollection
public long higher(long e)
LongSortedSet
higher
in interface LongSortedSet
higher
in class AbstractLongSortedSet
public long ceiling(long e)
LongSortedSet
ceiling
in interface LongSortedSet
ceiling
in class AbstractLongSortedSet
public long lower(long e)
LongSortedSet
lower
in interface LongSortedSet
lower
in class AbstractLongSortedSet
public long floor(long e)
LongSortedSet
floor
in interface LongSortedSet
floor
in class AbstractLongSortedSet
public boolean containsInterval(long first, long last)
LongSet
containsInterval
in interface LongSet
containsInterval
in class AbstractLongSet
public LongInterval enclosingInterval(long e)
LongSortedSet
enclosingInterval
in interface LongSortedSet
public LongIterator iterator()
LongSortedSet
iterator
in interface LongSortedSet
iterator
in class AbstractLongSortedSet
public LongIterator descendingIterator()
LongSortedSet
descendingIterator
in interface LongSortedSet
descendingIterator
in class AbstractLongSortedSet
public java.util.Iterator intervalIterator()
LongSortedSet
intervalIterator
in interface LongSortedSet
public java.util.Iterator descendingIntervalIterator()
LongSortedSet
descendingIntervalIterator
in interface LongSortedSet
public void clear()
LongSet
clear
in interface LongSet
clear
in class AbstractLongCollection
public boolean addInterval(long first, long last)
LongSet
addInterval
in interface LongSet
addInterval
in class AbstractLongSet
public boolean removeInterval(long first, long last)
LongSet
removeInterval
in interface LongSet
removeInterval
in class AbstractLongSet
public boolean retainInterval(long first, long last)
LongSet
retainInterval
in interface LongSet
retainInterval
in class AbstractLongSortedSet
public long pollFirst()
LongSortedSet
pollFirst
in interface LongSortedSet
pollFirst
in class AbstractLongSortedSet
public long pollLast()
LongSortedSet
pollLast
in interface LongSortedSet
pollLast
in class AbstractLongSortedSet
public LongInterval pollFirstInterval()
LongSortedSet
pollFirstInterval
in interface LongSortedSet
pollFirstInterval
in class AbstractLongSortedSet
public LongInterval pollLastInterval()
LongSortedSet
pollLastInterval
in interface LongSortedSet
pollLastInterval
in class AbstractLongSortedSet
public LongSortedSet subSet(long first, long last)
LongSortedSet
subSet
in interface LongSortedSet
first
- the minimum element of this view (inclusive).last
- the maximum element of this view (inclusive).
public LongSet complementSet()
LongSet
complementSet
in interface LongSet
complementSet
in class AbstractLongSet
public java.lang.String toString()
toString
in interface LongSortedSet
toString
in class AbstractLongCollection
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |