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 BasedSequence
basedSafeSubSequence
(@NotNull CharSequence charSequence) @NotNull BasedSequence
basedSubSequence
(@NotNull CharSequence charSequence) @NotNull CharSequence
charSubSequence
(@NotNull CharSequence charSequence) int
int
int
boolean
contains
(int index) boolean
contains
(int start, int end) boolean
boolean
doesContain
(int index) boolean
doesContain
(int start, int end) boolean
doesContain
(@NotNull Range other) boolean
doesNotOverlap
(@NotNull Range other) boolean
doesNotOverlapNorAdjacent
(@NotNull Range other) boolean
doesNotOverlapOrAdjacent
(@NotNull Range other) boolean
doesOverlap
(@NotNull Range other) boolean
doesOverlapOrAdjacent
(@NotNull Range other) boolean
doesProperlyContain
(@NotNull Range other) static @NotNull Range
emptyOf
(int position) endMinus
(int delta) endPlus
(int delta) boolean
@NotNull Range
@NotNull Range
expandToInclude
(int start, int end) @NotNull Range
expandToInclude
(@NotNull Range other) int
getEnd()
int
int
getSpan()
int
getStart()
int
int
hashCode()
@NotNull Range
include
(int pos) @NotNull Range
include
(int start, int end) @NotNull Range
@NotNull Range
boolean
isAdjacent
(int index) boolean
isAdjacent
(@NotNull Range other) boolean
isAdjacentAfter
(int index) boolean
isAdjacentAfter
(@NotNull Range other) boolean
isAdjacentBefore
(int index) boolean
isAdjacentBefore
(@NotNull Range other) boolean
isContainedBy
(int start, int end) boolean
isContainedBy
(@NotNull Range other) boolean
isEmpty()
boolean
isEnd
(int index) boolean
boolean
isLast
(int index) boolean
boolean
boolean
isNull()
boolean
isProperlyContainedBy
(int start, int end) boolean
isProperlyContainedBy
(@NotNull Range other) boolean
isStart
(int index) boolean
isValidIndex
(int index) boolean
leadBy
(int index) boolean
leads
(int index) static @NotNull Range
of
(int start, int end) static @NotNull Range
ofLength
(int start, int length) boolean
boolean
overlapsOrAdjacent
(@NotNull Range other) boolean
properlyContains
(@NotNull Range other) @NotNull RichSequence
richSafeSubSequence
(@NotNull CharSequence charSequence) @NotNull RichSequence
richSubSequence
(@NotNull CharSequence charSequence) @NotNull CharSequence
safeSubSequence
(@NotNull CharSequence charSequence) shiftLeft
(int delta) shiftRight
(int delta) startMinus
(int delta) startPlus
(int delta) @NotNull BasedSequence
subSequence
(@NotNull CharSequence charSequence) Deprecated.toString()
boolean
trailedBy
(int index) boolean
trails
(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
public int hashCode()
-
basedSubSequence(CharSequence)
instead