public class RangeList extends mVector
| Modifier and Type | Field and Description |
|---|---|
protected static Range |
buff |
capacityIncrement, elementCount, elementDataserialVersionUID| Constructor and Description |
|---|
RangeList() |
| Modifier and Type | Method and Description |
|---|---|
void |
addRange(int start,
int end)
Add this range to the RangeList, consolidating ranges as necessary to
minimize the number of Range objects within the list.
|
int |
countItems()
Count the number of items (not ranges) contained within all the Ranges
in the RangeList.
|
int |
countRanges() |
int |
findRangeWith(int value)
Find the index of the Range that contains the specified value.
|
protected void |
fixup() |
int |
getItemAtIndex(int idx) |
boolean |
inRange(int start) |
boolean |
inRange(int start,
int end)
Return if the specified range is already completely within the ranges
covered by this RangeList.
|
Range |
rangeAt(int rangeIndex,
Range dest) |
void |
removeAndShiftUp(int start,
int end) |
void |
removeRange(int start,
int end)
Remove a range from the list
|
void |
shift(int fromWhere,
int places)
Use this to shift up or down, but be careful shifting down.
|
int[] |
toIntArray() |
add, add, addAll, addAll, addAll, addAll, addCopiesFrom, cacheAllElements, clear, compareTo, copied, copyCopiesFrom, copyFrom, copyInto, copyInto, del, find, get, getCopy, getCount, getFullCopy, getNew, insert, iterator, newVector, pop, push, size, toArray, toArray, toArray, toArray, toArray, toObjectArray, toStringadd, addAll, addAll, addElement, capacity, clone, contains, containsAll, elementAt, elements, ensureCapacity, firstElement, indexOf, indexOf, insertElementAt, isEmpty, iterator, lastElement, lastIndexOf, lastIndexOf, remove, removeAll, removeAllElements, removeElement, removeElementAt, retainAll, setElementAt, setSize, size, trimToSizeequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitequals, hashCodeprotected static Range buff
public boolean inRange(int start)
public boolean inRange(int start,
int end)
start - end - public int findRangeWith(int value)
value - the value to look for.public void addRange(int start,
int end)
start - the start of the range.end - the end of the range.public void removeRange(int start,
int end)
start - the start of the range.end - the end of the range.protected void fixup()
public int countItems()
public int[] toIntArray()
public int getItemAtIndex(int idx)
public void shift(int fromWhere,
int places)
public int countRanges()
public void removeAndShiftUp(int start,
int end)