public abstract class ImmutableSortedListOfIntRanges extends Object implements ImmutableSortedListOfRanges
ImmutableSortedListOfRanges.ImmutableSortedListOfRangesIterator, ImmutableSortedListOfRanges.IntersectAndSubtractResult<T extends ImmutableSortedListOfRanges>| Modifier and Type | Field and Description |
|---|---|
protected int[] |
ranges |
| Modifier | Constructor and Description |
|---|---|
protected |
ImmutableSortedListOfIntRanges(int[] ranges) |
| Modifier and Type | Method and Description |
|---|---|
void |
appendRangesTo(RangesBuffer buffer,
int startIndex,
int endIndex)
Append all ranges from
startIndex (inclusive) to endIndex (exclusive) to the
given buffer. |
protected static int[] |
createInverseArray(SortedListOfRanges src,
Encodings.Encoding encoding) |
IntRangesBuffer |
createTempBuffer()
Creates a new buffer that is compatible with this list's storage implementation.
|
IntRangesBuffer |
getBuffer1(CompilationBuffer compilationBuffer)
Returns a buffer from the given
compilationBuffer that is compatible with this list's
storage implementation. |
IntRangesBuffer |
getBuffer2(CompilationBuffer compilationBuffer)
Returns a buffer from the given
compilationBuffer that is compatible with this list's
storage implementation. |
IntRangesBuffer |
getBuffer3(CompilationBuffer compilationBuffer)
Returns a buffer from the given
compilationBuffer that is compatible with this list's
storage implementation. |
int |
getHi(int i)
Returns the inclusive upper bound of the range stored at index
i. |
int |
getLo(int i)
Returns the inclusive lower bound of the range stored at index
i. |
boolean |
inverseIsSameHighByte(Encodings.Encoding encoding)
Returns
true iff not all values of this range set have the same high byte, but that
would be the case in the inverse of this range set. |
protected static boolean |
rangesEqual(int[] a,
int[] b,
int length) |
int |
size()
Returns the number of disjoint ranges contained in this list.
|
abstract int[] |
toArray() |
String |
toString() |
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, waitcreate, createEmpty, createIntersection, createIntersection, createIntersectionSingleRange, createInverse, equalsBuffer, intersectAndSubtract, iterator, subtract, union, union, unionaddRangeTo, adjacent, adjacent, adjacent, binarySearch, binarySearchExactMatch, binarySearchExactMatch, binarySearchGetFirstIntersecting, binarySearchGetFirstIntersecting, binarySearchGetFirstIntersectingOrAdjacent, binarySearchGetFirstIntersectingOrAdjacent, binarySearchNoIntersectingFound, containedBy, contains, contains, contains, contains, contains, defaultToString, equal, equal, equalsListOfRanges, getMax, getMin, intersect, intersects, intersects, intersects, intersects, inverseGetMax, inverseGetMin, inverseRangesToString, inverseValueCount, invert, isEmpty, isSingle, leftOf, leftOf, leftOf, leftOf, matches2CharsWith1BitDifference, matchesEverything, matchesMinAndMax, matchesNothing, matchesSingleAscii, matchesSingleChar, matchesSomething, rangesAreSortedAndDisjoint, rangesAreSortedNonAdjacentAndDisjoint, rangesToString, rightOf, rightOf, rightOf, rightOf, size, sizeOfInverse, union, valueCount, valueCountEquals, valueCountMaxforEach, spliteratorprotected ImmutableSortedListOfIntRanges(int[] ranges)
public int getLo(int i)
SortedListOfRangesi.getLo in interface SortedListOfRangespublic int getHi(int i)
SortedListOfRangesi.getHi in interface SortedListOfRangespublic int size()
SortedListOfRangessize in interface SortedListOfRangespublic IntRangesBuffer getBuffer1(CompilationBuffer compilationBuffer)
ImmutableSortedListOfRangescompilationBuffer that is compatible with this list's
storage implementation.getBuffer1 in interface ImmutableSortedListOfRangespublic IntRangesBuffer getBuffer2(CompilationBuffer compilationBuffer)
ImmutableSortedListOfRangescompilationBuffer that is compatible with this list's
storage implementation.getBuffer2 in interface ImmutableSortedListOfRangespublic IntRangesBuffer getBuffer3(CompilationBuffer compilationBuffer)
ImmutableSortedListOfRangescompilationBuffer that is compatible with this list's
storage implementation.getBuffer3 in interface ImmutableSortedListOfRangespublic IntRangesBuffer createTempBuffer()
ImmutableSortedListOfRangescreateTempBuffer in interface ImmutableSortedListOfRangespublic void appendRangesTo(RangesBuffer buffer, int startIndex, int endIndex)
SortedListOfRangesstartIndex (inclusive) to endIndex (exclusive) to the
given buffer. The caller is responsible for not violating the target buffer's
sortedness; This effectively means that the range at startIndex must be
rightOf the buffer's last range.appendRangesTo in interface SortedListOfRangespublic abstract int[] toArray()
public boolean inverseIsSameHighByte(Encodings.Encoding encoding)
true iff not all values of this range set have the same high byte, but that
would be the case in the inverse of this range set.protected static int[] createInverseArray(SortedListOfRanges src, Encodings.Encoding encoding)
protected static boolean rangesEqual(int[] a,
int[] b,
int length)