Class Range
java.lang.Object
com.vladsch.flexmark.util.sequence.Range
- Direct Known Subclasses:
TagRange
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription@NotNull BasedSequencebasedSafeSubSequence(@NotNull CharSequence charSequence) @NotNull BasedSequencebasedSubSequence(@NotNull CharSequence charSequence) @NotNull CharSequencecharSubSequence(@NotNull CharSequence charSequence) intintintbooleancontains(int index) booleancontains(int start, int end) booleanbooleandoesContain(int index) booleandoesContain(int start, int end) booleandoesContain(@NotNull Range other) booleandoesNotOverlap(@NotNull Range other) booleandoesNotOverlapNorAdjacent(@NotNull Range other) booleandoesNotOverlapOrAdjacent(@NotNull Range other) booleandoesOverlap(@NotNull Range other) booleandoesOverlapOrAdjacent(@NotNull Range other) booleandoesProperlyContain(@NotNull Range other) static @NotNull RangeemptyOf(int position) endMinus(int delta) endPlus(int delta) boolean@NotNull Range@NotNull RangeexpandToInclude(int start, int end) @NotNull RangeexpandToInclude(@NotNull Range other) intgetEnd()intintgetSpan()intgetStart()intinthashCode()@NotNull Rangeinclude(int pos) @NotNull Rangeinclude(int start, int end) @NotNull Range@NotNull RangebooleanisAdjacent(int index) booleanisAdjacent(@NotNull Range other) booleanisAdjacentAfter(int index) booleanisAdjacentAfter(@NotNull Range other) booleanisAdjacentBefore(int index) booleanisAdjacentBefore(@NotNull Range other) booleanisContainedBy(int start, int end) booleanisContainedBy(@NotNull Range other) booleanisEmpty()booleanisEnd(int index) booleanbooleanisLast(int index) booleanbooleanbooleanisNull()booleanisProperlyContainedBy(int start, int end) booleanisProperlyContainedBy(@NotNull Range other) booleanisStart(int index) booleanisValidIndex(int index) booleanleadBy(int index) booleanleads(int index) static @NotNull Rangeof(int start, int end) static @NotNull RangeofLength(int start, int length) booleanbooleanoverlapsOrAdjacent(@NotNull Range other) booleanproperlyContains(@NotNull Range other) @NotNull RichSequencerichSafeSubSequence(@NotNull CharSequence charSequence) @NotNull RichSequencerichSubSequence(@NotNull CharSequence charSequence) @NotNull CharSequencesafeSubSequence(@NotNull CharSequence charSequence) shiftLeft(int delta) shiftRight(int delta) startMinus(int delta) startPlus(int delta) @NotNull BasedSequencesubSequence(@NotNull CharSequence charSequence) Deprecated.toString()booleantrailedBy(int index) booleantrails(int index) withEnd(int end) withRange(int start, int end) withStart(int start)
-
Field Details
-
NULL
-
EMPTY
-
start
private final int start -
end
private final int end
-
-
Constructor Details
-
Range
protected Range(int start, int end) Create range- Parameters:
start- startend- end
-
Range
-
-
Method Details
-
of
-
emptyOf
-
ofLength
-
getStart
public int getStart() -
getEnd
public int getEnd() -
component1
public int component1() -
component2
public int component2() -
getStartOffset
public int getStartOffset() -
getEndOffset
public int getEndOffset() -
withStart
-
withEnd
-
endMinus
-
endPlus
-
startMinus
-
startPlus
-
withRange
-
shiftLeft
-
shiftRight
-
getSpan
public int getSpan() -
isNull
public boolean isNull() -
isNotNull
public boolean isNotNull() -
isEmpty
public boolean isEmpty() -
isNotEmpty
public boolean isNotEmpty() -
contains
-
doesContain
-
contains
public boolean contains(int index) -
doesContain
public boolean doesContain(int index) -
contains
public boolean contains(int start, int end) -
doesContain
public boolean doesContain(int start, int end) -
overlaps
-
doesOverlap
-
doesNotOverlap
-
overlapsOrAdjacent
-
doesOverlapOrAdjacent
-
doesNotOverlapOrAdjacent
-
doesNotOverlapNorAdjacent
-
properlyContains
-
doesProperlyContain
-
isAdjacent
public boolean isAdjacent(int index) -
isAdjacentAfter
public boolean isAdjacentAfter(int index) -
isAdjacentBefore
public boolean isAdjacentBefore(int index) -
isAdjacent
-
isAdjacentBefore
-
isAdjacentAfter
-
isContainedBy
-
isContainedBy
public boolean isContainedBy(int start, int end) -
isProperlyContainedBy
-
isProperlyContainedBy
public boolean isProperlyContainedBy(int start, int end) -
isEqual
-
isValidIndex
public boolean isValidIndex(int index) -
isStart
public boolean isStart(int index) -
isEnd
public boolean isEnd(int index) -
isLast
public boolean isLast(int index) -
leadBy
public boolean leadBy(int index) -
leads
public boolean leads(int index) -
trailedBy
public boolean trailedBy(int index) -
trails
public boolean trails(int index) -
intersect
-
exclude
-
compare
-
include
-
include
-
include
-
expandToInclude
-
expandToInclude
-
subSequence
@NotNull @Deprecated public @NotNull BasedSequence subSequence(@NotNull @NotNull CharSequence charSequence) Deprecated.usebasedSubSequence(CharSequence)insteadReturn a based subsequence of sequence given by this range- Parameters:
charSequence- char sequence from which to extract the range- Returns:
- resulting based subsequence
-
basedSubSequence
@NotNull public @NotNull BasedSequence basedSubSequence(@NotNull @NotNull CharSequence charSequence) -
basedSafeSubSequence
@NotNull public @NotNull BasedSequence basedSafeSubSequence(@NotNull @NotNull CharSequence charSequence) -
richSubSequence
-
richSafeSubSequence
@NotNull public @NotNull RichSequence richSafeSubSequence(@NotNull @NotNull CharSequence charSequence) -
charSubSequence
-
safeSubSequence
-
toString
-
equals
-
hashCode
-
basedSubSequence(CharSequence)instead