Class Range
- java.lang.Object
-
- com.vladsch.flexmark.util.sequence.Range
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description @NotNull BasedSequencebasedSafeSubSequence(@NotNull CharSequence charSequence)@NotNull BasedSequencebasedSubSequence(@NotNull CharSequence charSequence)@NotNull CharSequencecharSubSequence(@NotNull CharSequence charSequence)intcompare(@NotNull Range other)intcomponent1()intcomponent2()booleancontains(int index)booleancontains(int start, int end)booleancontains(@NotNull Range other)booleandoesContain(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)RangeendMinus(int delta)RangeendPlus(int delta)booleanequals(Object o)@NotNull Rangeexclude(@NotNull Range other)@NotNull RangeexpandToInclude(int start, int end)@NotNull RangeexpandToInclude(@NotNull Range other)intgetEnd()intgetEndOffset()intgetSpan()intgetStart()intgetStartOffset()inthashCode()@NotNull Rangeinclude(int pos)@NotNull Rangeinclude(int start, int end)@NotNull Rangeinclude(@NotNull Range other)@NotNull Rangeintersect(@NotNull Range other)booleanisAdjacent(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)booleanisEqual(@NotNull Range other)booleanisLast(int index)booleanisNotEmpty()booleanisNotNull()booleanisNull()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)booleanoverlaps(@NotNull Range other)booleanoverlapsOrAdjacent(@NotNull Range other)booleanproperlyContains(@NotNull Range other)@NotNull RichSequencerichSafeSubSequence(@NotNull CharSequence charSequence)@NotNull RichSequencerichSubSequence(@NotNull CharSequence charSequence)@NotNull CharSequencesafeSubSequence(@NotNull CharSequence charSequence)RangeshiftLeft(int delta)RangeshiftRight(int delta)RangestartMinus(int delta)RangestartPlus(int delta)@NotNull BasedSequencesubSequence(@NotNull CharSequence charSequence)Deprecated.usebasedSubSequence(CharSequence)insteadStringtoString()booleantrailedBy(int index)booleantrails(int index)RangewithEnd(int end)RangewithRange(int start, int end)RangewithStart(int start)
-
-
-
Constructor Detail
-
Range
protected Range(int start, int end)Create range- Parameters:
start- startend- end
-
Range
protected Range(@NotNull @NotNull Range other)
-
-
Method Detail
-
of
@NotNull public static @NotNull Range of(int start, int end)
-
emptyOf
@NotNull public static @NotNull Range emptyOf(int position)
-
ofLength
@NotNull public static @NotNull Range ofLength(int start, int length)
-
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
public Range withStart(int start)
-
withEnd
public Range withEnd(int end)
-
endMinus
public Range endMinus(int delta)
-
endPlus
public Range endPlus(int delta)
-
startMinus
public Range startMinus(int delta)
-
startPlus
public Range startPlus(int delta)
-
withRange
public Range withRange(int start, int end)
-
shiftLeft
public Range shiftLeft(int delta)
-
shiftRight
public Range shiftRight(int delta)
-
getSpan
public int getSpan()
-
isNull
public boolean isNull()
-
isNotNull
public boolean isNotNull()
-
isEmpty
public boolean isEmpty()
-
isNotEmpty
public boolean isNotEmpty()
-
contains
public boolean contains(@NotNull @NotNull Range other)
-
doesContain
public boolean doesContain(@NotNull @NotNull Range other)
-
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
public boolean overlaps(@NotNull @NotNull Range other)
-
doesOverlap
public boolean doesOverlap(@NotNull @NotNull Range other)
-
doesNotOverlap
public boolean doesNotOverlap(@NotNull @NotNull Range other)
-
overlapsOrAdjacent
public boolean overlapsOrAdjacent(@NotNull @NotNull Range other)
-
doesOverlapOrAdjacent
public boolean doesOverlapOrAdjacent(@NotNull @NotNull Range other)
-
doesNotOverlapOrAdjacent
public boolean doesNotOverlapOrAdjacent(@NotNull @NotNull Range other)
-
doesNotOverlapNorAdjacent
public boolean doesNotOverlapNorAdjacent(@NotNull @NotNull Range other)
-
properlyContains
public boolean properlyContains(@NotNull @NotNull Range other)
-
doesProperlyContain
public boolean doesProperlyContain(@NotNull @NotNull Range other)
-
isAdjacent
public boolean isAdjacent(int index)
-
isAdjacentAfter
public boolean isAdjacentAfter(int index)
-
isAdjacentBefore
public boolean isAdjacentBefore(int index)
-
isAdjacent
public boolean isAdjacent(@NotNull @NotNull Range other)
-
isAdjacentBefore
public boolean isAdjacentBefore(@NotNull @NotNull Range other)
-
isAdjacentAfter
public boolean isAdjacentAfter(@NotNull @NotNull Range other)
-
isContainedBy
public boolean isContainedBy(@NotNull @NotNull Range other)
-
isContainedBy
public boolean isContainedBy(int start, int end)
-
isProperlyContainedBy
public boolean isProperlyContainedBy(@NotNull @NotNull Range other)
-
isProperlyContainedBy
public boolean isProperlyContainedBy(int start, int end)
-
isEqual
public boolean isEqual(@NotNull @NotNull Range other)
-
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)
-
compare
public int compare(@NotNull @NotNull Range other)
-
include
@NotNull public @NotNull Range include(int pos)
-
include
@NotNull public @NotNull Range include(int start, int end)
-
expandToInclude
@NotNull public @NotNull Range expandToInclude(int start, int end)
-
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
@NotNull public @NotNull RichSequence richSubSequence(@NotNull @NotNull CharSequence charSequence)
-
richSafeSubSequence
@NotNull public @NotNull RichSequence richSafeSubSequence(@NotNull @NotNull CharSequence charSequence)
-
charSubSequence
@NotNull public @NotNull CharSequence charSubSequence(@NotNull @NotNull CharSequence charSequence)
-
safeSubSequence
@NotNull public @NotNull CharSequence safeSubSequence(@NotNull @NotNull CharSequence charSequence)
-
-