|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.emory.mathcs.util.collections.shorts.AbstractShortCollection
edu.emory.mathcs.util.collections.shorts.AbstractShortSet
edu.emory.mathcs.util.collections.shorts.AbstractShortSortedSet
edu.emory.mathcs.util.collections.shorts.AbstractShortInterval
Base class for (possibly mutable) interval classes.
| Nested Class Summary | |
protected static class |
AbstractShortInterval.ComplementView
|
protected static class |
AbstractShortInterval.ConstrainedView
|
static class |
AbstractShortInterval.SimpleIntervalItemIterator
|
static class |
AbstractShortInterval.SimpleReverseIntervalItemIterator
|
| Nested classes inherited from class edu.emory.mathcs.util.collections.shorts.AbstractShortSortedSet |
AbstractShortSortedSet.AbstractComplementSubView, AbstractShortSortedSet.AbstractSubView, AbstractShortSortedSet.ForwardIntervalItemIterator, AbstractShortSortedSet.ReverseIntervalItemIterator |
| Constructor Summary | |
AbstractShortInterval()
|
|
| Method Summary | |
boolean |
addInterval(short first,
short last)
Adds to this set all the numbers between first and last, inclusive, that are not already present in this set and beshort to this set's domain. |
short |
ceiling(short e)
Returns the smallest number in this set >= e. |
ShortInterval |
ceilingInterval(short 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. |
ShortSet |
complementSet()
Returns a complement view of this set. |
boolean |
contains(short e)
Returns true if this set contains the specified number; false otherwise. |
boolean |
containsInterval(short first,
short 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. |
ShortIterator |
descendingIterator()
Returns an iterator over numbers in this set, in a decreasing numerical order. |
ShortInterval |
enclosingInterval(short 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. |
short |
first()
Returns the smallest number in this set. |
ShortInterval |
firstInterval()
Returns the first (left-most), widest interval contained in this set, or null if this set is empty. |
short |
floor(short e)
Returns the largest number in this set <= e. |
ShortInterval |
floorInterval(short n)
Returns the largest (right-most), widest interval contained in this set which elements are not all greater than the specified number. |
protected abstract short |
getFirst()
|
protected abstract short |
getLast()
|
short |
higher(short e)
Returns the smallest number in this set > e. |
ShortInterval |
higherInterval(short 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. |
ShortIterator |
iterator()
Returns an iterator over numbers in this set, in an increasing numerical order. |
short |
last()
Returns the largest number in this set. |
ShortInterval |
lastInterval()
Returns the last (right-most), widest interval contained in this set, or null if this set is empty. |
short |
lower(short e)
Returns the largest number in this set < e. |
ShortInterval |
lowerInterval(short n)
Returns the largest and widest interval contained in this set which all elements are strictly less than the specified number. |
short |
max()
The largest number that can be stored in this set. |
short |
min()
The smallest number that can be stored in this set. |
short |
pollFirst()
Returns and removes the smallest number in this set. |
ShortInterval |
pollFirstInterval()
Returns and removes the first (left-most), widest interval contained in this set, or null if this set is empty. |
short |
pollLast()
Returns and removes the largest number in this set. |
ShortInterval |
pollLastInterval()
Returns and removes the last (right-most), widest interval contained in this set, or null if this set is empty. |
boolean |
removeInterval(short first,
short last)
Removes from this set all the numbers between first and last, inclusive. |
boolean |
retainInterval(short first,
short last)
Retains in this set only the numbers between first and last, inclusive. |
int |
size()
Returns the number of elements in this set. |
ShortSortedSet |
subSet(short first,
short 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.shorts.AbstractShortSortedSet |
headSet, retainAll, tailSet, toCompactString |
| Methods inherited from class edu.emory.mathcs.util.collections.shorts.AbstractShortSet |
addAll, equals, hashCode, removeAll |
| Methods inherited from class edu.emory.mathcs.util.collections.shorts.AbstractShortCollection |
add, containsAll, remove, 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.shorts.ShortSortedSet |
headSet, tailSet, toCompactString |
| Methods inherited from interface edu.emory.mathcs.util.collections.shorts.ShortSet |
add, addAll, containsAll, equals, hashCode, remove, removeAll, retainAll, toArray, toArray |
| Constructor Detail |
public AbstractShortInterval()
| Method Detail |
protected abstract short getFirst()
protected abstract short getLast()
public short min()
ShortSet
min in interface ShortSetmin in class AbstractShortSetpublic short max()
ShortSet
max in interface ShortSetmax in class AbstractShortSetpublic short first()
ShortSortedSet
first in interface ShortSortedSetfirst in class AbstractShortSortedSetpublic short last()
ShortSortedSet
last in interface ShortSortedSetlast in class AbstractShortSortedSetpublic int intervalCount()
ShortSortedSet
intervalCount in interface ShortSortedSetintervalCount in class AbstractShortSortedSetpublic ShortInterval firstInterval()
ShortSortedSet
firstInterval in interface ShortSortedSetfirstInterval in class AbstractShortSortedSetpublic ShortInterval lastInterval()
ShortSortedSet
lastInterval in interface ShortSortedSetlastInterval in class AbstractShortSortedSetpublic ShortInterval lowerInterval(short n)
ShortSortedSet
lowerInterval in interface ShortSortedSetpublic ShortInterval floorInterval(short n)
ShortSortedSet
floorInterval in interface ShortSortedSetpublic ShortInterval higherInterval(short n)
ShortSortedSet
higherInterval in interface ShortSortedSetpublic ShortInterval ceilingInterval(short n)
ShortSortedSet
ceilingInterval in interface ShortSortedSetpublic int size()
ShortSet
size in interface ShortSetsize in class AbstractShortSortedSetpublic boolean isEmpty()
ShortSet
isEmpty in interface ShortSetisEmpty in class AbstractShortSortedSetpublic boolean contains(short e)
ShortSet
contains in interface ShortSetcontains in class AbstractShortCollectionpublic short higher(short e)
ShortSortedSet
higher in interface ShortSortedSethigher in class AbstractShortSortedSetpublic short ceiling(short e)
ShortSortedSet
ceiling in interface ShortSortedSetceiling in class AbstractShortSortedSetpublic short lower(short e)
ShortSortedSet
lower in interface ShortSortedSetlower in class AbstractShortSortedSetpublic short floor(short e)
ShortSortedSet
floor in interface ShortSortedSetfloor in class AbstractShortSortedSet
public boolean containsInterval(short first,
short last)
ShortSet
containsInterval in interface ShortSetcontainsInterval in class AbstractShortSetpublic ShortInterval enclosingInterval(short e)
ShortSortedSet
enclosingInterval in interface ShortSortedSetpublic ShortIterator iterator()
ShortSortedSet
iterator in interface ShortSortedSetiterator in class AbstractShortSortedSetpublic ShortIterator descendingIterator()
ShortSortedSet
descendingIterator in interface ShortSortedSetdescendingIterator in class AbstractShortSortedSetpublic java.util.Iterator intervalIterator()
ShortSortedSet
intervalIterator in interface ShortSortedSetpublic java.util.Iterator descendingIntervalIterator()
ShortSortedSet
descendingIntervalIterator in interface ShortSortedSetpublic void clear()
ShortSet
clear in interface ShortSetclear in class AbstractShortCollection
public boolean addInterval(short first,
short last)
ShortSet
addInterval in interface ShortSetaddInterval in class AbstractShortSet
public boolean removeInterval(short first,
short last)
ShortSet
removeInterval in interface ShortSetremoveInterval in class AbstractShortSet
public boolean retainInterval(short first,
short last)
ShortSet
retainInterval in interface ShortSetretainInterval in class AbstractShortSortedSetpublic short pollFirst()
ShortSortedSet
pollFirst in interface ShortSortedSetpollFirst in class AbstractShortSortedSetpublic short pollLast()
ShortSortedSet
pollLast in interface ShortSortedSetpollLast in class AbstractShortSortedSetpublic ShortInterval pollFirstInterval()
ShortSortedSet
pollFirstInterval in interface ShortSortedSetpollFirstInterval in class AbstractShortSortedSetpublic ShortInterval pollLastInterval()
ShortSortedSet
pollLastInterval in interface ShortSortedSetpollLastInterval in class AbstractShortSortedSet
public ShortSortedSet subSet(short first,
short last)
ShortSortedSet
subSet in interface ShortSortedSetfirst - the minimum element of this view (inclusive).last - the maximum element of this view (inclusive).
public ShortSet complementSet()
ShortSet
complementSet in interface ShortSetcomplementSet in class AbstractShortSetpublic java.lang.String toString()
toString in interface ShortSortedSettoString in class AbstractShortCollection
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||