Interface ImmutableSortedListOfRanges
- All Superinterfaces:
CharacterSet,Iterable<Range>,SortedListOfRanges
- All Known Implementing Classes:
CodePointSet,ImmutableSortedListOfIntRanges
Extensions of
SortedListOfRanges specific to immutable implementations. Any methods of
this interface that return a list instance may return references to existing objects.-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classstatic final class -
Method Summary
Modifier and TypeMethodDescription<T extends SortedListOfRanges>
Tcreate(RangesBuffer buffer) Returns an immutable equivalent of the givenbuffer.<T extends SortedListOfRanges>
TReturns an empty list.default <T extends ImmutableSortedListOfRanges>
TcreateIntersection(T o, RangesBuffer tmp) Returns the intersection of this list ando, usingtmpas working buffer.default <T extends ImmutableSortedListOfRanges>
TcreateIntersection(T o, CompilationBuffer compilationBuffer) Returns the intersection of this list ando.<T extends ImmutableSortedListOfRanges>
T<T extends SortedListOfRanges>
TcreateInverse(Encodings.Encoding encoding) Returns a list containing all values of [Encodings.Encoding.getMinValue()Encodings.Encoding.getMaxValue()] not contained in this list.Creates a new buffer that is compatible with this list's storage implementation.booleanequalsBuffer(RangesBuffer buffer) Returnstrueif this list equalsbuffer.getBuffer1(CompilationBuffer compilationBuffer) Returns a buffer from the givencompilationBufferthat is compatible with this list's storage implementation.getBuffer2(CompilationBuffer compilationBuffer) Returns a buffer from the givencompilationBufferthat is compatible with this list's storage implementation.getBuffer3(CompilationBuffer compilationBuffer) Returns a buffer from the givencompilationBufferthat is compatible with this list's storage implementation.default <T extends ImmutableSortedListOfRanges>
ImmutableSortedListOfRanges.IntersectAndSubtractResult<T> intersectAndSubtract(T o, CompilationBuffer compilationBuffer) Calculates the intersection and the "rest" of this ando.iterator()default <T extends SortedListOfRanges>
Tsubtract(T o) default <T extends SortedListOfRanges>
Tsubtract(T o, RangesBuffer subtractionRanges) Returns the result of the subtraction ofofrom this list.default <T extends SortedListOfRanges>
Tsubtract(T o, CompilationBuffer compilationBuffer) Returns the result of the subtraction ofofrom this list.default <T extends ImmutableSortedListOfRanges>
Tunion(T o) Returns the union of this list ando.default <T extends ImmutableSortedListOfRanges>
Tunion(T o, RangesBuffer target) Convertstargetto the union of this list andoand returns an immutable equivalent.default <T extends ImmutableSortedListOfRanges>
Tunion(T o, CompilationBuffer compilationBuffer) Returns the union of this list ando.Methods inherited from interface java.lang.Iterable
forEach, spliteratorMethods inherited from interface com.oracle.truffle.regex.charset.SortedListOfRanges
addRangeTo, adjacent, adjacent, appendRangesTo, binarySearch, binarySearchExactMatch, binarySearchExactMatch, binarySearchGetFirstIntersecting, binarySearchGetFirstIntersecting, binarySearchGetFirstIntersectingOrAdjacent, binarySearchGetFirstIntersectingOrAdjacent, binarySearchNoIntersectingFound, containedBy, contains, contains, contains, contains, defaultToString, equal, equal, equalsListOfRanges, getHi, getLo, getMax, getMin, intersects, intersects, intersects, inverseGetMax, inverseGetMin, inverseRangesToString, inverseValueCount, isEmpty, isSingle, leftOf, leftOf, matches2CharsWith1BitDifference, matchesEverything, matchesMinAndMax, matchesNothing, matchesSingleAscii, matchesSingleChar, matchesSomething, rangesAreSortedAndDisjoint, rangesAreSortedNonAdjacentAndDisjoint, rangesToString, rightOf, rightOf, size, size, sizeOfInverse, valueCount, valueCountEquals, valueCountMax
-
Method Details
-
createEmpty
Returns an empty list. -
create
Returns an immutable equivalent of the givenbuffer. -
createInverse
Returns a list containing all values of [Encodings.Encoding.getMinValue()Encodings.Encoding.getMaxValue()] not contained in this list. -
getBuffer1
Returns a buffer from the givencompilationBufferthat is compatible with this list's storage implementation. -
getBuffer2
Returns a buffer from the givencompilationBufferthat is compatible with this list's storage implementation. -
getBuffer3
Returns a buffer from the givencompilationBufferthat is compatible with this list's storage implementation. -
createTempBuffer
RangesBuffer createTempBuffer()Creates a new buffer that is compatible with this list's storage implementation. -
equalsBuffer
Returnstrueif this list equalsbuffer. -
createIntersection
default <T extends ImmutableSortedListOfRanges> T createIntersection(T o, CompilationBuffer compilationBuffer) Returns the intersection of this list ando. UsesgetBuffer1(CompilationBuffer). -
createIntersection
Returns the intersection of this list ando, usingtmpas working buffer. -
createIntersectionSingleRange
-
subtract
-
subtract
Returns the result of the subtraction ofofrom this list. UsesgetBuffer1(CompilationBuffer). -
subtract
Returns the result of the subtraction ofofrom this list. -
intersectAndSubtract
default <T extends ImmutableSortedListOfRanges> ImmutableSortedListOfRanges.IntersectAndSubtractResult<T> intersectAndSubtract(T o, CompilationBuffer compilationBuffer) Calculates the intersection and the "rest" of this ando. UsesgetBuffer1(CompilationBuffer),getBuffer2(CompilationBuffer)andgetBuffer3(CompilationBuffer).- Parameters:
o- MatcherBuilder to intersect with.- Returns:
- a new
ImmutableSortedListOfRanges.IntersectAndSubtractResult, where fieldsubtractedAis equal tothis.subtract(intersection),subtractedBis equal too.subtract(intersection)andintersectedis equal tothis.createIntersection(o)
-
union
Returns the union of this list ando. Creates a temporary buffer. -
union
Returns the union of this list ando. UsesgetBuffer1(CompilationBuffer). -
union
Convertstargetto the union of this list andoand returns an immutable equivalent. -
iterator
-