public final class CodePointSet extends Object implements ImmutableSortedListOfRanges, JsonConvertible
ImmutableSortedListOfRanges.IntersectAndSubtractResult<T extends ImmutableSortedListOfRanges>| 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. |
static CodePointSet |
create(int... ranges) |
static CodePointSet |
create(IntRangesBuffer buf) |
CodePointSet |
create(RangesBuffer buffer)
Returns an immutable equivalent of the given
buffer. |
CodePointSet |
createEmpty()
Returns an empty list.
|
CodePointSet |
createFull()
|
CodePointSet |
createInverse()
Returns a list containing all values of [
SortedListOfRanges.getMinValue() SortedListOfRanges.getMaxValue()]
not contained in this list. |
static CodePointSet |
createInverse(SortedListOfRanges src) |
static CodePointSet |
createNoDedup(int... ranges) |
IntRangesBuffer |
createTempBuffer()
Creates a new buffer that is compatible with this list's storage implementation.
|
String |
dumpRaw() |
boolean |
equals(Object obj) |
boolean |
equalsBuffer(RangesBuffer buffer)
Returns
true if this list equals buffer. |
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. |
static CodePointSet |
getEmpty() |
static CodePointSet |
getFull() |
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. |
int |
getMaxValue()
Returns the maximum value that may be contained in an instance of this list.
|
int |
getMinValue()
Returns the minimum value that may be contained in an instance of this list.
|
int[] |
getRanges() |
int |
hashCode() |
int |
size()
Returns the number of disjoint ranges contained in this list.
|
JsonValue |
toJson() |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitcreateIntersection, createIntersection, intersectAndSubtract, 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, intersects, intersects, intersects, intersects, inverseRangesToString, inverseValueCount, isEmpty, isSingle, leftOf, leftOf, leftOf, leftOf, matches2CharsWith1BitDifference, matchesEverything, matchesNothing, matchesSingleAscii, matchesSingleChar, matchesSomething, rangesAreSortedAndDisjoint, rangesToString, rangeToString, rightOf, rightOf, rightOf, rightOf, size, sizeOfInverse, union, valueCountpublic int[] getRanges()
public static CodePointSet getEmpty()
public static CodePointSet getFull()
public static CodePointSet create(int... ranges)
public static CodePointSet createNoDedup(int... ranges)
public static CodePointSet create(IntRangesBuffer buf)
public CodePointSet createEmpty()
ImmutableSortedListOfRangescreateEmpty in interface ImmutableSortedListOfRangespublic CodePointSet createFull()
ImmutableSortedListOfRangescreateFull in interface ImmutableSortedListOfRangespublic CodePointSet create(RangesBuffer buffer)
ImmutableSortedListOfRangesbuffer.create in interface ImmutableSortedListOfRangespublic int getMinValue()
SortedListOfRangesgetMinValue in interface SortedListOfRangespublic int getMaxValue()
SortedListOfRangesgetMaxValue in interface SortedListOfRangespublic 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 boolean equalsBuffer(RangesBuffer buffer)
ImmutableSortedListOfRangestrue if this list equals buffer.equalsBuffer in interface ImmutableSortedListOfRangespublic CodePointSet createInverse()
ImmutableSortedListOfRangesSortedListOfRanges.getMinValue() SortedListOfRanges.getMaxValue()]
not contained in this list.createInverse in interface ImmutableSortedListOfRangespublic static CodePointSet createInverse(SortedListOfRanges src)
public JsonValue toJson()
toJson in interface JsonConvertiblepublic String dumpRaw()