Top Description Constructors Methods
com.vladsch.flexmark.util.sequence

public abstract Class BasedSequenceImpl

extends IRichSequenceBase<BasedSequence>
implements BasedSequence
Class Inheritance
All Implemented Interfaces
com.vladsch.flexmark.util.sequence.BasedSequence, com.vladsch.flexmark.util.sequence.BasedOptionsHolder, com.vladsch.flexmark.util.sequence.IRichSequence, com.vladsch.flexmark.util.sequence.SequenceUtils, java.lang.Comparable, java.lang.CharSequence
Known Direct Subclasses
com.vladsch.flexmark.util.sequence.CharSubSequence, com.vladsch.flexmark.util.sequence.MappedBasedSequence, com.vladsch.flexmark.util.sequence.PrefixedSubSequence, com.vladsch.flexmark.util.sequence.SegmentedSequence, com.vladsch.flexmark.util.sequence.SubSequence, com.vladsch.flexmark.util.sequence.BasedSequence.EmptyBasedSequence
Imports
com.vladsch.flexmark.util.misc.CharPredicate, .Pair, .Utils, com.vladsch.flexmark.util.sequence.builder.BasedSegmentBuilder, .IBasedSegmentBuilder, .SequenceBuilder, com.vladsch.flexmark.util.sequence.builder.tree.SegmentTree, com.vladsch.flexmark.util.sequence.mappers.CharMapper, org.jetbrains.annotations.NotNull, .Nullable

Implementation of BaseSequence

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
public int
public int
public int
public int
public int
public int
public int
public @NotNull Pair<Integer, Integer>
public @NotNull Pair<Integer, Integer>
public @NotNull Pair<Integer, Integer>
public @NotNull Range
public @NotNull Range
public @NotNull Range
public int
public int
public int
public int
public final @NotNull BasedSequence
baseSubSequence(int
offset from 0 of original sequence
startIndex
)

Implements com.vladsch.flexmark.util.sequence.BasedSequence.baseSubSequence.

Get a portion of the original sequence that this sequence is based on

public @NotNull BasedSequence
baseSubSequence(int
offset from 0 of original sequence
startIndex
,
int
offset from 0 of original sequence
endIndex
)

Implements com.vladsch.flexmark.util.sequence.BasedSequence.baseSubSequence.

Get a portion of this sequence's base sequence

Note

this means that if this sequence applies modifications to the original sequence then these modifications are NOT be applied to the returned sequence.

public boolean
public boolean
public boolean
public boolean
public boolean
public boolean
pack-priv static BasedSequence
public @NotNull BasedSequence[]
public @NotNull BasedSequence
public @NotNull BasedSequence
extendByAny(@NotNull CharPredicate charSet, int maxCount)

public @NotNull BasedSequence
public @NotNull BasedSequence
extendByAnyNot(@NotNull CharPredicate charSet, int maxCount)

public @NotNull BasedSequence
public @NotNull BasedSequence
public final @NotNull BasedSequence
public final @NotNull BasedSequence
public final @NotNull BasedSequence
public final @NotNull BasedSequence
extendToEndOfLine(@NotNull CharPredicate eolChars, boolean includeEol)

public final @NotNull BasedSequence
public final @NotNull BasedSequence
public final @NotNull BasedSequence
public @NotNull BasedSequence
extendToStartOfLine(@NotNull CharPredicate eolChars, boolean includeEol)

public static BasedSequence
public @NotNull SequenceBuilder
public @NotNull BasedSequence
public @NotNull BasedSequence
public @NotNull SegmentTree

Returns:

null for contiguous sequences, else segment tree for this sequence
getSegmentTree
()

Implements com.vladsch.flexmark.util.sequence.BasedSequence.getSegmentTree.

Get the segment tree for this sequence or null if sequence is contiguous from startOffset to endOffset

public @NotNull BasedSequence
public boolean
isBaseCharAt(int index, @NotNull CharPredicate predicate)

public boolean
public boolean
public @NotNull BasedSequence
public @NotNull BasedSequence
public @NotNull BasedSequence
public @NotNull BasedSequence
public @NotNull BasedSequence
public final @NotNull BasedSequence
public @NotNull BasedSequence
prefixWithIndent(int
maximum columns to include, default Integer#MAX_VALUE
maxColumns
)

Implements com.vladsch.flexmark.util.sequence.BasedSequence.prefixWithIndent.

Extend this based sequence to include characters from underlying based sequence taking tab expansion to 4th spaces into account

public char
safeBaseCharAt(int
index in string
index
)

Implements com.vladsch.flexmark.util.sequence.BasedSequence.safeBaseCharAt.

Safe, if index out of range but based sequence has characters will return those, else returns '\0'

Allows peeking into preceding/following characters to the ones contained in this sequence

public char
safeCharAt(int
index
index
)

Overrides com.vladsch.flexmark.util.sequence.IRichSequenceBase.safeCharAt.

Implements com.vladsch.flexmark.util.sequence.IRichSequence.safeCharAt.

return char at index or '\0' if index <0 or >=length()

public @NotNull BasedSequence
sequenceOf(@Nullable CharSequence charSequence, int startIndex, int endIndex)

public @NotNull BasedSequence
public @NotNull BasedSequence
public @NotNull BasedSequence
public @Nullable String
public @NotNull String
unescape()

Implements com.vladsch.flexmark.util.sequence.BasedSequence.unescape.

Get the unescaped string of this sequence content

public @NotNull BasedSequence
public @NotNull String
unescapeNoEntities()

Implements com.vladsch.flexmark.util.sequence.BasedSequence.unescapeNoEntities.

Get the unescaped string of this sequence content without unescaping entities

Inherited from com.vladsch.flexmark.util.sequence.IRichSequenceBase:
appendappendappendEOLappendRangesToappendRangesToappendRangesToappendRangesToappendSpaceappendSpacesappendToappendToappendToappendToappendToappendToblankLinesRemovedRangesblankLinesRemovedRangesblankLinesRemovedRangesblankLinesRemovedRangescolumnAtIndexcompareTocountLeadingcountLeadingcountLeadingcountLeadingColumnscountLeadingNotcountLeadingNotcountLeadingNotcountLeadingNotSpacecountLeadingNotSpacecountLeadingNotSpacecountLeadingNotSpaceTabcountLeadingNotSpaceTabcountLeadingNotSpaceTabcountLeadingNotWhitespacecountLeadingNotWhitespacecountLeadingNotWhitespacecountLeadingSpacecountLeadingSpacecountLeadingSpacecountLeadingSpaceTabcountLeadingSpaceTabcountLeadingSpaceTabcountLeadingWhitespacecountLeadingWhitespacecountLeadingWhitespacecountOfAnycountOfAnycountOfAnycountOfAnyNotcountOfAnyNotcountOfAnyNotcountOfNotSpaceTabcountOfNotWhitespacecountOfSpaceTabcountOfWhitespacecountTrailingcountTrailingcountTrailingcountTrailingNotcountTrailingNotcountTrailingNotcountTrailingNotSpacecountTrailingNotSpacecountTrailingNotSpacecountTrailingNotSpaceTabcountTrailingNotSpaceTabcountTrailingNotSpaceTabcountTrailingNotWhitespacecountTrailingNotWhitespacecountTrailingNotWhitespacecountTrailingSpacecountTrailingSpacecountTrailingSpacecountTrailingSpaceTabcountTrailingSpaceTabcountTrailingSpaceTabcountTrailingWhitespacecountTrailingWhitespacecountTrailingWhitespacedeleteendCharAtendOfDelimitedByendOfDelimitedByAnyendOfDelimitedByAnyNotendOfLineendOfLineAnyEOLendSequenceendSequenceendsWithendsWithendsWithendsWithAnyEOLendsWithEOLendsWithIgnoreCaseendsWithSpaceendsWithSpaceTabendsWithWhitespaceeolEndLengtheolEndLengtheolEndRangeeolStartLengtheolStartRangeequalsequalsequalsIgnoreCaseextractRangesextractRangesfirstCharhashCodeifNullifNullEmptyAfterifNullEmptyBeforeindexOfindexOfindexOfindexOfindexOfindexOfindexOfAllindexOfAnyindexOfAnyindexOfAnyindexOfAnyNotindexOfAnyNotindexOfAnyNotindexOfNotindexOfNotindexOfNotinsertisBlankisCharAtisEmptyisInisInisNotBlankisNotEmptyisNotNullisNulllastCharlastIndexOflastIndexOflastIndexOflastIndexOflastIndexOflastIndexOflastIndexOfAnylastIndexOfAnylastIndexOfAnylastIndexOfAnyNotlastIndexOfAnyNotlastIndexOfAnyNotlastIndexOfNotlastIndexOfNotlastIndexOfNotleadingBlankLinesRangeleadingBlankLinesRangeleadingBlankLinesRangeleadingBlankLinesRangelineAtlineAtAnyEOLlineColumnAtIndexlineRangeAtlineRangeAtAnyEOLmatchCharsmatchCharsmatchCharsmatchCharsmatchCharsIgnoreCasematchCharsIgnoreCasematchCharsReversedmatchCharsReversedmatchCharsReversedIgnoreCasematchedCharCountmatchedCharCountmatchedCharCountmatchedCharCountmatchedCharCountmatchedCharCountIgnoreCasematchedCharCountIgnoreCasematchedCharCountReversedmatchedCharCountReversedmatchedCharCountReversedmatchedCharCountReversedmatchedCharCountReversedIgnoreCasematchedCharCountReversedIgnoreCasematchesmatchesmatchesIgnoreCasemidCharAtmidSequencemidSequencenormalizeEndWithEOLnormalizeEOLnullIfnullIfnullIfnullIfnullIfBlanknullIfEmptynullIfEndsWithnullIfEndsWithnullIfEndsWithIgnoreCasenullIfNotnullIfNotnullIfNotnullIfNotEndsWithnullIfNotEndsWithnullIfNotEndsWithIgnoreCasenullIfNotStartsWithnullIfNotStartsWithnullIfNotStartsWithIgnoreCasenullIfStartsWithnullIfStartsWithnullIfStartsWithIgnoreCasepaddingpaddingpadEndpadEndpadStartpadStartprefixOnceWithprefixOnceWithEOLprefixOnceWithSpaceprefixWithprefixWithEOLprefixWithSpaceprefixWithSpacesremovePrefixremovePrefixremovePrefixIgnoreCaseremoveProperPrefixremoveProperPrefixremoveProperPrefixIgnoreCaseremoveProperSuffixremoveProperSuffixremoveProperSuffixIgnoreCaseremoveSuffixremoveSuffixremoveSuffixIgnoreCasereplacereplacesafeSubSequencesafeSubSequencesequenceOfsequenceOfsplitsplitsplitsplitsplitsplitEOLsplitEOLsplitListsplitListsplitListsplitListsplitListsplitListEOLsplitListEOLsplitListEOLstartOfDelimitedBystartOfDelimitedByAnystartOfDelimitedByAnyNotstartOfLinestartOfLineAnyEOLstartsWithstartsWithstartsWithstartsWithAnyEOLstartsWithEOLstartsWithIgnoreCasestartsWithSpacestartsWithSpaceTabstartsWithWhitespacesubSequencesubSequencesubSequenceAftersubSequenceBeforesubSequenceBeforeAftersuffixOnceWithsuffixOnceWithEOLsuffixOnceWithSpacesuffixWithsuffixWithEOLsuffixWithSpacesuffixWithSpacestoLowerCasetoNbSptoSpctoStringtoUpperCasetoVisibleWhitespaceStringtrailingBlankLinesRangetrailingBlankLinesRangetrailingBlankLinesRangetrailingBlankLinesRangetrimtrimtrimtrimtrimEndtrimEndtrimEndtrimEndtrimEndRangetrimEndRangetrimEndRangetrimEndRangetrimEOLtrimLeadBlankLinestrimmedtrimmedtrimmedtrimmedtrimmedEndtrimmedEndtrimmedEndtrimmedEndtrimmedEOLtrimmedStarttrimmedStarttrimmedStarttrimmedStarttrimRangetrimRangetrimRangetrimRangetrimStarttrimStarttrimStarttrimStarttrimStartRangetrimStartRangetrimStartRangetrimStartRangetrimTailBlankLinestrimToEndOfLinetrimToEndOfLinetrimToEndOfLinetrimToEndOfLinetrimToEndOfLinetrimToStartOfLinetrimToStartOfLinetrimToStartOfLinetrimToStartOfLinetrimToStartOfLinevalidateIndexvalidateIndexInclusiveEndvalidateStartEnd