|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.emory.mathcs.util.collections.ints.AbstractIntCollection
edu.emory.mathcs.util.collections.ints.AbstractIntSet
edu.emory.mathcs.util.collections.ints.AbstractIntSortedSet
edu.emory.mathcs.util.collections.ints.AbstractIntInterval
Base class for (possibly mutable) interval classes.
| Nested Class Summary | |
protected static class |
AbstractIntInterval.ComplementView
|
protected static class |
AbstractIntInterval.ConstrainedView
|
static class |
AbstractIntInterval.SimpleIntervalItemIterator
|
static class |
AbstractIntInterval.SimpleReverseIntervalItemIterator
|
| Nested classes inherited from class edu.emory.mathcs.util.collections.ints.AbstractIntSortedSet |
AbstractIntSortedSet.AbstractComplementSubView, AbstractIntSortedSet.AbstractSubView, AbstractIntSortedSet.ForwardIntervalItemIterator, AbstractIntSortedSet.ReverseIntervalItemIterator |
| Constructor Summary | |
AbstractIntInterval()
|
|
| Method Summary | |
boolean |
addInterval(int first,
int last)
Adds to this set all the numbers between first and last, inclusive, that are not already present in this set and beint to this set's domain. |
int |
ceiling(int e)
Returns the smallest number in this set >= e. |
IntInterval |
ceilingInterval(int 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. |
IntSet |
complementSet()
Returns a complement view of this set. |
boolean |
contains(int e)
Returns true if this set contains the specified number; false otherwise. |
boolean |
containsInterval(int first,
int 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. |
IntIterator |
descendingIterator()
Returns an iterator over numbers in this set, in a decreasing numerical order. |
IntInterval |
enclosingInterval(int 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. |
int |
first()
Returns the smallest number in this set. |
IntInterval |
firstInterval()
Returns the first (left-most), widest interval contained in this set, or null if this set is empty. |
int |
floor(int e)
Returns the largest number in this set <= e. |
IntInterval |
floorInterval(int n)
Returns the largest (right-most), widest interval contained in this set which elements are not all greater than the specified number. |
protected abstract int |
getFirst()
|
protected abstract int |
getLast()
|
int |
higher(int e)
Returns the smallest number in this set > e. |
IntInterval |
higherInterval(int 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. |
IntIterator |
iterator()
Returns an iterator over numbers in this set, in an increasing numerical order. |
int |
last()
Returns the largest number in this set. |
IntInterval |
lastInterval()
Returns the last (right-most), widest interval contained in this set, or null if this set is empty. |
int |
lower(int e)
Returns the largest number in this set < e. |
IntInterval |
lowerInterval(int n)
Returns the largest and widest interval contained in this set which all elements are strictly less than the specified number. |
int |
max()
The largest number that can be stored in this set. |
int |
min()
The smallest number that can be stored in this set. |
int |
pollFirst()
Returns and removes the smallest number in this set. |
IntInterval |
pollFirstInterval()
Returns and removes the first (left-most), widest interval contained in this set, or null if this set is empty. |
int |
pollLast()
Returns and removes the largest number in this set. |
IntInterval |
pollLastInterval()
Returns and removes the last (right-most), widest interval contained in this set, or null if this set is empty. |
boolean |
removeInterval(int first,
int last)
Removes from this set all the numbers between first and last, inclusive. |
boolean |
retainInterval(int first,
int last)
Retains in this set only the numbers between first and last, inclusive. |
int |
size64()
Returns the number of elements in this set. |
IntSortedSet |
subSet(int first,
int 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.ints.AbstractIntSortedSet |
headSet, retainAll, tailSet, toCompactString |
| Methods inherited from class edu.emory.mathcs.util.collections.ints.AbstractIntSet |
addAll, equals, hashCode, removeAll |
| Methods inherited from class edu.emory.mathcs.util.collections.ints.AbstractIntCollection |
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.ints.IntSortedSet |
headSet, tailSet, toCompactString |
| Methods inherited from interface edu.emory.mathcs.util.collections.ints.IntSet |
add, addAll, containsAll, equals, hashCode, remove, removeAll, retainAll, size, toArray, toArray |
| Constructor Detail |
public AbstractIntInterval()
| Method Detail |
protected abstract int getFirst()
protected abstract int getLast()
public int min()
IntSet
min in interface IntSetmin in class AbstractIntSetpublic int max()
IntSet
max in interface IntSetmax in class AbstractIntSetpublic int first()
IntSortedSet
first in interface IntSortedSetfirst in class AbstractIntSortedSetpublic int last()
IntSortedSet
last in interface IntSortedSetlast in class AbstractIntSortedSetpublic int intervalCount()
IntSortedSet
intervalCount in interface IntSortedSetintervalCount in class AbstractIntSortedSetpublic IntInterval firstInterval()
IntSortedSet
firstInterval in interface IntSortedSetfirstInterval in class AbstractIntSortedSetpublic IntInterval lastInterval()
IntSortedSet
lastInterval in interface IntSortedSetlastInterval in class AbstractIntSortedSetpublic IntInterval lowerInterval(int n)
IntSortedSet
lowerInterval in interface IntSortedSetpublic IntInterval floorInterval(int n)
IntSortedSet
floorInterval in interface IntSortedSetpublic IntInterval higherInterval(int n)
IntSortedSet
higherInterval in interface IntSortedSetpublic IntInterval ceilingInterval(int n)
IntSortedSet
ceilingInterval in interface IntSortedSetpublic int size64()
IntSet
size64 in interface IntSetsize64 in class AbstractIntSortedSetpublic boolean isEmpty()
IntSet
isEmpty in interface IntSetisEmpty in class AbstractIntSortedSetpublic boolean contains(int e)
IntSet
contains in interface IntSetcontains in class AbstractIntCollectionpublic int higher(int e)
IntSortedSet
higher in interface IntSortedSethigher in class AbstractIntSortedSetpublic int ceiling(int e)
IntSortedSet
ceiling in interface IntSortedSetceiling in class AbstractIntSortedSetpublic int lower(int e)
IntSortedSet
lower in interface IntSortedSetlower in class AbstractIntSortedSetpublic int floor(int e)
IntSortedSet
floor in interface IntSortedSetfloor in class AbstractIntSortedSet
public boolean containsInterval(int first,
int last)
IntSet
containsInterval in interface IntSetcontainsInterval in class AbstractIntSetpublic IntInterval enclosingInterval(int e)
IntSortedSet
enclosingInterval in interface IntSortedSetpublic IntIterator iterator()
IntSortedSet
iterator in interface IntSortedSetiterator in class AbstractIntSortedSetpublic IntIterator descendingIterator()
IntSortedSet
descendingIterator in interface IntSortedSetdescendingIterator in class AbstractIntSortedSetpublic java.util.Iterator intervalIterator()
IntSortedSet
intervalIterator in interface IntSortedSetpublic java.util.Iterator descendingIntervalIterator()
IntSortedSet
descendingIntervalIterator in interface IntSortedSetpublic void clear()
IntSet
clear in interface IntSetclear in class AbstractIntCollection
public boolean addInterval(int first,
int last)
IntSet
addInterval in interface IntSetaddInterval in class AbstractIntSet
public boolean removeInterval(int first,
int last)
IntSet
removeInterval in interface IntSetremoveInterval in class AbstractIntSet
public boolean retainInterval(int first,
int last)
IntSet
retainInterval in interface IntSetretainInterval in class AbstractIntSortedSetpublic int pollFirst()
IntSortedSet
pollFirst in interface IntSortedSetpollFirst in class AbstractIntSortedSetpublic int pollLast()
IntSortedSet
pollLast in interface IntSortedSetpollLast in class AbstractIntSortedSetpublic IntInterval pollFirstInterval()
IntSortedSet
pollFirstInterval in interface IntSortedSetpollFirstInterval in class AbstractIntSortedSetpublic IntInterval pollLastInterval()
IntSortedSet
pollLastInterval in interface IntSortedSetpollLastInterval in class AbstractIntSortedSet
public IntSortedSet subSet(int first,
int last)
IntSortedSet
subSet in interface IntSortedSetfirst - the minimum element of this view (inclusive).last - the maximum element of this view (inclusive).
public IntSet complementSet()
IntSet
complementSet in interface IntSetcomplementSet in class AbstractIntSetpublic java.lang.String toString()
toString in interface IntSortedSettoString in class AbstractIntCollection
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||