Class SegmentedSequence
- java.lang.Object
-
- com.vladsch.flexmark.util.sequence.IRichSequenceBase<BasedSequence>
-
- com.vladsch.flexmark.util.sequence.BasedSequenceImpl
-
- com.vladsch.flexmark.util.sequence.SegmentedSequence
-
- All Implemented Interfaces:
BasedOptionsHolder,BasedSequence,IRichSequence<BasedSequence>,ReplacedBasedSequence,SequenceUtils,CharSequence,Comparable<CharSequence>
- Direct Known Subclasses:
SegmentedSequenceFull,SegmentedSequenceTree
public abstract class SegmentedSequence extends BasedSequenceImpl implements ReplacedBasedSequence
A BasedSequence which consists of segments of other BasedSequences
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.vladsch.flexmark.util.sequence.BasedOptionsHolder
BasedOptionsHolder.Options
-
Nested classes/interfaces inherited from interface com.vladsch.flexmark.util.sequence.BasedSequence
BasedSequence.EmptyBasedSequence
-
-
Field Summary
Fields Modifier and Type Field Description protected BasedSequencebaseSeqprotected intendOffsetprotected intlengthprotected intstartOffset-
Fields inherited from interface com.vladsch.flexmark.util.sequence.BasedOptionsHolder
F_APPLICATION_OPTIONS, F_COLLECT_FIRST256_STATS, F_COLLECT_SEGMENTED_STATS, F_FULL_SEGMENTED_SEQUENCES, F_LIBRARY_OPTIONS, F_NO_ANCHORS, F_TREE_SEGMENTED_SEQUENCES, O_COLLECT_FIRST256_STATS, O_COLLECT_SEGMENTED_STATS, O_FULL_SEGMENTED_SEQUENCES, O_NO_ANCHORS, O_TREE_SEGMENTED_SEQUENCES, SEGMENTED_STATS
-
Fields inherited from interface com.vladsch.flexmark.util.sequence.BasedSequence
EMPTY, EMPTY_ARRAY, EMPTY_LIST, EMPTY_SEGMENTS, EOL, LINE_SEP, NULL, SPACE
-
Fields inherited from interface com.vladsch.flexmark.util.sequence.SequenceUtils
ANY_EOL, ANY_EOL_SET, BACKSLASH_SET, DECIMAL_DIGITS, EMPTY_INDICES, ENC_NUL, EOL, EOL_CHAR, EOL_CHAR1, EOL_CHAR2, EOL_CHARS, EOL_SET, HASH_SET, HEXADECIMAL_DIGITS, LINE_SEP, LS, LSEP, NBSP, NBSP_CHARS, NUL, OCTAL_DIGITS, SPACE, SPACE_EOL, SPACE_EOL_SET, SPACE_SET, SPACE_TAB, SPACE_TAB_EOL_SET, SPACE_TAB_NBSP_SET, SPACE_TAB_SET, SPC, SPLIT_INCLUDE_DELIM_PARTS, SPLIT_INCLUDE_DELIMS, SPLIT_SKIP_EMPTY, SPLIT_TRIM_PARTS, SPLIT_TRIM_SKIP_EMPTY, TAB_SET, US, US_CHARS, US_SET, visibleSpacesMap, WHITESPACE, WHITESPACE_CHARS, WHITESPACE_NBSP, WHITESPACE_NBSP_CHARS, WHITESPACE_NBSP_SET, WHITESPACE_NO_EOL_CHARS, WHITESPACE_SET
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedSegmentedSequence(BasedSequence baseSeq, int startOffset, int endOffset, int length)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description booleanallOptions(int options)Options test for options for this sequencebooleananyOptions(int options)Options test for options for this sequence@NotNull BasedSequencebaseSubSequence(int startIndex, int endIndex)Get a portion of this sequence's base sequencestatic BasedSequencecreate(BasedSequence... segments)static BasedSequencecreate(BasedSequence basedSequence, @NotNull Iterable<? extends BasedSequence> segments)UseBasedSequence.getBuilder()and thenISequenceBuilder.addAll(Iterable)or if you know which are based segments vs.static BasedSequencecreate(SequenceBuilder builder)@NotNull ObjectgetBase()Get the underlying object on which this sequence contents are based@NotNull BasedSequencegetBaseSequence()Get the base sequence for the textintgetEndOffset()Get the end offset in the base sequence<T> TgetOption(com.vladsch.flexmark.util.data.DataKeyBase<T> dataKey)Options holder, default has none, only available on BasedSequenceWithOptionsintgetOptionFlags()Options test for options for this sequence@Nullable com.vladsch.flexmark.util.data.DataHoldergetOptions()Options holder, default has none, only available on BasedSequenceWithOptions@NotNull RangegetSourceRange()Get the range of this sequence in originalBasedSequence.getBaseSequence()andBasedSequence.getBase()original text source.intgetStartOffset()Get the start in the base sequence for this segmented sequence.intlength()static BasedSequenceof(BasedSequence... segments)Deprecated.static BasedSequenceof(BasedSequence basedSequence, @NotNull Iterable<? extends BasedSequence> segments)Deprecated.useBasedSequence.getBuilder()and thenISequenceBuilder.addAll(Iterable)or if you know which are based segments vs.-
Methods inherited from class com.vladsch.flexmark.util.sequence.BasedSequenceImpl
addSegments, baseColumnAtEnd, baseColumnAtIndex, baseColumnAtStart, baseEndOfLine, baseEndOfLine, baseEndOfLineAnyEOL, baseEndOfLineAnyEOL, baseLineColumnAtEnd, baseLineColumnAtIndex, baseLineColumnAtStart, baseLineRangeAtEnd, baseLineRangeAtIndex, baseLineRangeAtStart, baseStartOfLine, baseStartOfLine, baseStartOfLineAnyEOL, baseStartOfLineAnyEOL, baseSubSequence, containsAllOf, containsOnlyIn, containsOnlyNotIn, containsSomeIn, containsSomeNotIn, containsSomeOf, emptyArray, extendByAny, extendByAny, extendByAnyNot, extendByAnyNot, extendByOneOfAny, extendByOneOfAnyNot, extendToEndOfLine, extendToEndOfLine, extendToEndOfLine, extendToEndOfLine, extendToStartOfLine, extendToStartOfLine, extendToStartOfLine, extendToStartOfLine, firstNonNull, getBuilder, getEmptyPrefix, getEmptySuffix, getSegmentTree, intersect, isBaseCharAt, isContinuationOf, isContinuedBy, normalizeEndWithEOL, normalizeEOL, nullSequence, prefixOf, prefixWith, prefixWithIndent, prefixWithIndent, safeBaseCharAt, safeCharAt, sequenceOf, spliceAtEnd, suffixOf, toMapped, toStringOrNull, unescape, unescape, unescapeNoEntities
-
Methods inherited from class com.vladsch.flexmark.util.sequence.IRichSequenceBase
append, append, appendEOL, appendRangesTo, appendRangesTo, appendRangesTo, appendRangesTo, appendSpace, appendSpaces, appendTo, appendTo, appendTo, appendTo, appendTo, appendTo, blankLinesRemovedRanges, blankLinesRemovedRanges, blankLinesRemovedRanges, blankLinesRemovedRanges, columnAtIndex, compareTo, countLeading, countLeading, countLeading, countLeadingColumns, countLeadingNot, countLeadingNot, countLeadingNot, countLeadingNotSpace, countLeadingNotSpace, countLeadingNotSpace, countLeadingNotSpaceTab, countLeadingNotSpaceTab, countLeadingNotSpaceTab, countLeadingNotWhitespace, countLeadingNotWhitespace, countLeadingNotWhitespace, countLeadingSpace, countLeadingSpace, countLeadingSpace, countLeadingSpaceTab, countLeadingSpaceTab, countLeadingSpaceTab, countLeadingWhitespace, countLeadingWhitespace, countLeadingWhitespace, countOfAny, countOfAny, countOfAny, countOfAnyNot, countOfAnyNot, countOfAnyNot, countOfNotSpaceTab, countOfNotWhitespace, countOfSpaceTab, countOfWhitespace, countTrailing, countTrailing, countTrailing, countTrailingNot, countTrailingNot, countTrailingNot, countTrailingNotSpace, countTrailingNotSpace, countTrailingNotSpace, countTrailingNotSpaceTab, countTrailingNotSpaceTab, countTrailingNotSpaceTab, countTrailingNotWhitespace, countTrailingNotWhitespace, countTrailingNotWhitespace, countTrailingSpace, countTrailingSpace, countTrailingSpace, countTrailingSpaceTab, countTrailingSpaceTab, countTrailingSpaceTab, countTrailingWhitespace, countTrailingWhitespace, countTrailingWhitespace, delete, endCharAt, endOfDelimitedBy, endOfDelimitedByAny, endOfDelimitedByAnyNot, endOfLine, endOfLineAnyEOL, endSequence, endSequence, endsWith, endsWith, endsWith, endsWithAnyEOL, endsWithEOL, endsWithIgnoreCase, endsWithSpace, endsWithSpaceTab, endsWithWhitespace, eolEndLength, eolEndLength, eolEndRange, eolStartLength, eolStartRange, equals, equals, equalsIgnoreCase, extractRanges, extractRanges, firstChar, hashCode, ifNull, ifNullEmptyAfter, ifNullEmptyBefore, indexOf, indexOf, indexOf, indexOf, indexOf, indexOf, indexOfAll, indexOfAny, indexOfAny, indexOfAny, indexOfAnyNot, indexOfAnyNot, indexOfAnyNot, indexOfNot, indexOfNot, indexOfNot, insert, isBlank, isCharAt, isEmpty, isIn, isIn, isNotBlank, isNotEmpty, isNotNull, isNull, lastChar, lastIndexOf, lastIndexOf, lastIndexOf, lastIndexOf, lastIndexOf, lastIndexOf, lastIndexOfAny, lastIndexOfAny, lastIndexOfAny, lastIndexOfAnyNot, lastIndexOfAnyNot, lastIndexOfAnyNot, lastIndexOfNot, lastIndexOfNot, lastIndexOfNot, leadingBlankLinesRange, leadingBlankLinesRange, leadingBlankLinesRange, leadingBlankLinesRange, lineAt, lineAtAnyEOL, lineColumnAtIndex, lineRangeAt, lineRangeAtAnyEOL, matchChars, matchChars, matchChars, matchChars, matchCharsIgnoreCase, matchCharsIgnoreCase, matchCharsReversed, matchCharsReversed, matchCharsReversedIgnoreCase, matchedCharCount, matchedCharCount, matchedCharCount, matchedCharCount, matchedCharCount, matchedCharCountIgnoreCase, matchedCharCountIgnoreCase, matchedCharCountReversed, matchedCharCountReversed, matchedCharCountReversed, matchedCharCountReversed, matchedCharCountReversedIgnoreCase, matchedCharCountReversedIgnoreCase, matches, matches, matchesIgnoreCase, midCharAt, midSequence, midSequence, normalizeEndWithEOL, normalizeEOL, nullIf, nullIf, nullIf, nullIf, nullIfBlank, nullIfEmpty, nullIfEndsWith, nullIfEndsWith, nullIfEndsWithIgnoreCase, nullIfNot, nullIfNot, nullIfNot, nullIfNotEndsWith, nullIfNotEndsWith, nullIfNotEndsWithIgnoreCase, nullIfNotStartsWith, nullIfNotStartsWith, nullIfNotStartsWithIgnoreCase, nullIfStartsWith, nullIfStartsWith, nullIfStartsWithIgnoreCase, padding, padding, padEnd, padEnd, padStart, padStart, prefixOnceWith, prefixOnceWithEOL, prefixOnceWithSpace, prefixWithEOL, prefixWithSpace, prefixWithSpaces, removePrefix, removePrefix, removePrefixIgnoreCase, removeProperPrefix, removeProperPrefix, removeProperPrefixIgnoreCase, removeProperSuffix, removeProperSuffix, removeProperSuffixIgnoreCase, removeSuffix, removeSuffix, removeSuffixIgnoreCase, replace, replace, safeSubSequence, safeSubSequence, sequenceOf, sequenceOf, split, split, split, split, split, splitEOL, splitEOL, splitList, splitList, splitList, splitList, splitList, splitListEOL, splitListEOL, splitListEOL, startOfDelimitedBy, startOfDelimitedByAny, startOfDelimitedByAnyNot, startOfLine, startOfLineAnyEOL, startsWith, startsWith, startsWith, startsWithAnyEOL, startsWithEOL, startsWithIgnoreCase, startsWithSpace, startsWithSpaceTab, startsWithWhitespace, subSequence, subSequence, subSequenceAfter, subSequenceBefore, subSequenceBeforeAfter, suffixOnceWith, suffixOnceWithEOL, suffixOnceWithSpace, suffixWith, suffixWithEOL, suffixWithSpace, suffixWithSpaces, toLowerCase, toNbSp, toSpc, toString, toUpperCase, toVisibleWhitespaceString, trailingBlankLinesRange, trailingBlankLinesRange, trailingBlankLinesRange, trailingBlankLinesRange, trim, trim, trim, trim, trimEnd, trimEnd, trimEnd, trimEnd, trimEndRange, trimEndRange, trimEndRange, trimEndRange, trimEOL, trimLeadBlankLines, trimmed, trimmed, trimmed, trimmed, trimmedEnd, trimmedEnd, trimmedEnd, trimmedEnd, trimmedEOL, trimmedStart, trimmedStart, trimmedStart, trimmedStart, trimRange, trimRange, trimRange, trimRange, trimStart, trimStart, trimStart, trimStart, trimStartRange, trimStartRange, trimStartRange, trimStartRange, trimTailBlankLines, trimToEndOfLine, trimToEndOfLine, trimToEndOfLine, trimToEndOfLine, trimToEndOfLine, trimToStartOfLine, trimToStartOfLine, trimToStartOfLine, trimToStartOfLine, trimToStartOfLine, validateIndex, validateIndexInclusiveEnd, validateStartEnd
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.vladsch.flexmark.util.sequence.BasedSequence
addSegments, baseColumnAtEnd, baseColumnAtIndex, baseColumnAtStart, baseEndOfLine, baseEndOfLine, baseEndOfLineAnyEOL, baseEndOfLineAnyEOL, baseLineColumnAtEnd, baseLineColumnAtIndex, baseLineColumnAtStart, baseLineRangeAtEnd, baseLineRangeAtIndex, baseLineRangeAtStart, baseStartOfLine, baseStartOfLine, baseStartOfLineAnyEOL, baseStartOfLineAnyEOL, baseSubSequence, containsAllOf, containsOnlyIn, containsOnlyNotIn, containsSomeIn, containsSomeNotIn, containsSomeOf, extendByAny, extendByAny, extendByAnyNot, extendByAnyNot, extendByOneOfAny, extendByOneOfAnyNot, extendToAny, extendToAny, extendToEndOfLine, extendToEndOfLine, extendToEndOfLine, extendToEndOfLine, extendToStartOfLine, extendToStartOfLine, extendToStartOfLine, extendToStartOfLine, getBuilder, getEmptyPrefix, getEmptySuffix, getIndexOffset, getSegmentTree, intersect, isBaseCharAt, isContinuationOf, isContinuedBy, normalizeEndWithEOL, normalizeEOL, prefixOf, prefixWithIndent, prefixWithIndent, safeBaseCharAt, spliceAtEnd, subSequence, suffixOf, unescape, unescape, unescapeNoEntities
-
Methods inherited from interface java.lang.CharSequence
charAt, chars, codePoints, toString
-
Methods inherited from interface java.lang.Comparable
compareTo
-
Methods inherited from interface com.vladsch.flexmark.util.sequence.IRichSequence
append, append, appendEOL, appendRangesTo, appendRangesTo, appendRangesTo, appendRangesTo, appendSpace, appendSpaces, appendTo, appendTo, appendTo, appendTo, appendTo, appendTo, blankLinesRemovedRanges, blankLinesRemovedRanges, blankLinesRemovedRanges, blankLinesRemovedRanges, columnAtIndex, countLeading, countLeading, countLeading, countLeading, countLeading, countLeadingColumns, countLeadingNot, countLeadingNot, countLeadingNot, countLeadingNotSpace, countLeadingNotSpace, countLeadingNotSpace, countLeadingNotSpaceTab, countLeadingNotSpaceTab, countLeadingNotSpaceTab, countLeadingNotWhitespace, countLeadingNotWhitespace, countLeadingNotWhitespace, countLeadingSpace, countLeadingSpace, countLeadingSpace, countLeadingSpaceTab, countLeadingSpaceTab, countLeadingSpaceTab, countLeadingWhitespace, countLeadingWhitespace, countLeadingWhitespace, countOf, countOfAny, countOfAny, countOfAny, countOfAnyNot, countOfAnyNot, countOfAnyNot, countOfNotSpaceTab, countOfNotWhitespace, countOfSpaceTab, countOfWhitespace, countTrailing, countTrailing, countTrailing, countTrailing, countTrailingNot, countTrailingNot, countTrailingNot, countTrailingNotSpace, countTrailingNotSpace, countTrailingNotSpace, countTrailingNotSpaceTab, countTrailingNotSpaceTab, countTrailingNotSpaceTab, countTrailingNotWhitespace, countTrailingNotWhitespace, countTrailingNotWhitespace, countTrailingSpace, countTrailingSpace, countTrailingSpace, countTrailingSpaceTab, countTrailingSpaceTab, countTrailingSpaceTab, countTrailingWhitespace, countTrailingWhitespace, countTrailingWhitespace, delete, emptyArray, endCharAt, endOfDelimitedBy, endOfDelimitedByAny, endOfDelimitedByAnyNot, endOfLine, endOfLineAnyEOL, endSequence, endSequence, endsWith, endsWith, endsWith, endsWithAnyEOL, endsWithEOL, endsWithIgnoreCase, endsWithSpace, endsWithSpaceTab, endsWithWhitespace, eolEndLength, eolEndLength, eolEndRange, eolLength, eolStartLength, eolStartLength, eolStartRange, equals, equals, equalsIgnoreCase, extractRanges, extractRanges, firstChar, getColumnAtIndex, getLineColumnAtIndex, hashCode, ifNull, ifNullEmptyAfter, ifNullEmptyBefore, indexOf, indexOf, indexOf, indexOf, indexOf, indexOf, indexOfAll, indexOfAny, indexOfAny, indexOfAny, indexOfAnyNot, indexOfAnyNot, indexOfAnyNot, indexOfNot, indexOfNot, indexOfNot, insert, insert, isBlank, isCharAt, isEmpty, isIn, isIn, isNotBlank, isNotEmpty, isNotNull, isNull, lastChar, lastIndexOf, lastIndexOf, lastIndexOf, lastIndexOf, lastIndexOf, lastIndexOf, lastIndexOfAny, lastIndexOfAny, lastIndexOfAny, lastIndexOfAnyNot, lastIndexOfAnyNot, lastIndexOfAnyNot, lastIndexOfNot, lastIndexOfNot, lastIndexOfNot, leadingBlankLinesRange, leadingBlankLinesRange, leadingBlankLinesRange, leadingBlankLinesRange, lineAt, lineAtAnyEOL, lineColumnAtIndex, lineRangeAt, lineRangeAtAnyEOL, matchChars, matchChars, matchChars, matchChars, matchCharsIgnoreCase, matchCharsIgnoreCase, matchCharsReversed, matchCharsReversed, matchCharsReversedIgnoreCase, matchedCharCount, matchedCharCount, matchedCharCount, matchedCharCount, matchedCharCount, matchedCharCountIgnoreCase, matchedCharCountIgnoreCase, matchedCharCountReversed, matchedCharCountReversed, matchedCharCountReversed, matchedCharCountReversed, matchedCharCountReversedIgnoreCase, matchedCharCountReversedIgnoreCase, matches, matches, matchesIgnoreCase, midCharAt, midSequence, midSequence, normalizeEndWithEOL, normalizeEOL, nullIf, nullIf, nullIf, nullIf, nullIfBlank, nullIfEmpty, nullIfEndsWith, nullIfEndsWith, nullIfEndsWithIgnoreCase, nullIfEndsWithNot, nullIfNot, nullIfNot, nullIfNot, nullIfNotEndsWith, nullIfNotEndsWith, nullIfNotEndsWithIgnoreCase, nullIfNotStartsWith, nullIfNotStartsWith, nullIfNotStartsWithIgnoreCase, nullIfStartsWith, nullIfStartsWith, nullIfStartsWithIgnoreCase, nullIfStartsWithNot, nullSequence, padding, padding, padEnd, padEnd, padStart, padStart, prefixOnceWith, prefixOnceWithEOL, prefixOnceWithSpace, prefixWith, prefixWithEOL, prefixWithSpace, prefixWithSpaces, removePrefix, removePrefix, removePrefixIgnoreCase, removeProperPrefix, removeProperPrefix, removeProperPrefixIgnoreCase, removeProperSuffix, removeProperSuffix, removeProperSuffixIgnoreCase, removeSuffix, removeSuffix, removeSuffixIgnoreCase, replace, replace, safeCharAt, safeSubSequence, safeSubSequence, sequenceOf, sequenceOf, sequenceOf, split, split, split, split, split, split, split, split, splitEOL, splitEOL, splitList, splitList, splitList, splitList, splitList, splitListEOL, splitListEOL, splitListEOL, startOfDelimitedBy, startOfDelimitedByAny, startOfDelimitedByAnyNot, startOfLine, startOfLineAnyEOL, startsWith, startsWith, startsWith, startsWithAnyEOL, startsWithEOL, startsWithIgnoreCase, startsWithSpace, startsWithSpaceTab, startsWithWhitespace, subSequence, subSequence, subSequenceAfter, subSequenceBefore, suffixOnceWith, suffixOnceWithEOL, suffixOnceWithSpace, suffixWith, suffixWithEOL, suffixWithSpace, suffixWithSpaces, toLowerCase, toMapped, toNbSp, toSpc, toStringOrNull, toUpperCase, toVisibleWhitespaceString, trailingBlankLinesRange, trailingBlankLinesRange, trailingBlankLinesRange, trailingBlankLinesRange, trim, trim, trim, trim, trimEnd, trimEnd, trimEnd, trimEnd, trimEndRange, trimEndRange, trimEndRange, trimEndRange, trimEOL, trimLeadBlankLines, trimmed, trimmed, trimmed, trimmed, trimmedEnd, trimmedEnd, trimmedEnd, trimmedEnd, trimmedEOL, trimmedStart, trimmedStart, trimmedStart, trimmedStart, trimRange, trimRange, trimRange, trimRange, trimStart, trimStart, trimStart, trimStart, trimStartRange, trimStartRange, trimStartRange, trimStartRange, trimTailBlankLines, trimToEndOfLine, trimToEndOfLine, trimToEndOfLine, trimToEndOfLine, trimToEndOfLine, trimToStartOfLine, trimToStartOfLine, trimToStartOfLine, trimToStartOfLine, trimToStartOfLine
-
-
-
-
Field Detail
-
baseSeq
protected final BasedSequence baseSeq
-
startOffset
protected final int startOffset
-
endOffset
protected final int endOffset
-
length
protected final int length
-
-
Constructor Detail
-
SegmentedSequence
protected SegmentedSequence(BasedSequence baseSeq, int startOffset, int endOffset, int length)
-
-
Method Detail
-
getBase
@NotNull public final @NotNull Object getBase()
Description copied from interface:BasedSequenceGet the underlying object on which this sequence contents are based- Specified by:
getBasein interfaceBasedSequence- Returns:
- underlying object containing original text
-
getBaseSequence
@NotNull public final @NotNull BasedSequence getBaseSequence()
Description copied from interface:BasedSequenceGet the base sequence for the text- Specified by:
getBaseSequencein interfaceBasedSequence- Returns:
- base sequence
-
getStartOffset
public final int getStartOffset()
Get the start in the base sequence for this segmented sequence.NOTE: this is the startOffset determined when the sequence was built from segments and may differ from the startOffset of the first based segment in this sequence
- Specified by:
getStartOffsetin interfaceBasedSequence- Returns:
- start in base sequence
-
getEndOffset
public final int getEndOffset()
Get the end offset in the base sequenceNOTE: this is the endOffset determined when the sequence was built from segments and may differ from the endOffset of the last based segment in this sequence
- Specified by:
getEndOffsetin interfaceBasedSequence- Returns:
- end in base sequence
-
getOptionFlags
public final int getOptionFlags()
Description copied from interface:BasedOptionsHolderOptions test for options for this sequencedefault reports true for global default options (if any) , variation available on BasedSequenceWithOptions
- Specified by:
getOptionFlagsin interfaceBasedOptionsHolder- Returns:
- option flags for this sequence
-
allOptions
public final boolean allOptions(int options)
Description copied from interface:BasedOptionsHolderOptions test for options for this sequencedefault reports true for global default options (if any) , variation available on BasedSequenceWithOptions
- Specified by:
allOptionsin interfaceBasedOptionsHolder- Parameters:
options- option flags- Returns:
- true if all option flags passed are set for this sequence
-
anyOptions
public final boolean anyOptions(int options)
Description copied from interface:BasedOptionsHolderOptions test for options for this sequencedefault reports true for global default options (if any) , variation available on BasedSequenceWithOptions
- Specified by:
anyOptionsin interfaceBasedOptionsHolder- Parameters:
options- option flags- Returns:
- true if any option flags passed are set for this sequence
-
getOption
public final <T> T getOption(com.vladsch.flexmark.util.data.DataKeyBase<T> dataKey)
Description copied from interface:BasedOptionsHolderOptions holder, default has none, only available on BasedSequenceWithOptions- Specified by:
getOptionin interfaceBasedOptionsHolder- Type Parameters:
T- type of value held by key- Parameters:
dataKey- in options- Returns:
- true if data key is available
-
getOptions
@Nullable public final @Nullable com.vladsch.flexmark.util.data.DataHolder getOptions()
Description copied from interface:BasedOptionsHolderOptions holder, default has none, only available on BasedSequenceWithOptions- Specified by:
getOptionsin interfaceBasedOptionsHolder- Returns:
- data holder with options or null if none for this sequence
-
length
public final int length()
- Specified by:
lengthin interfaceCharSequence
-
getSourceRange
@NotNull public final @NotNull Range getSourceRange()
Description copied from interface:BasedSequenceGet the range of this sequence in originalBasedSequence.getBaseSequence()andBasedSequence.getBase()original text source.- Specified by:
getSourceRangein interfaceBasedSequence- Returns:
- Range of start offset and end offset
-
baseSubSequence
@NotNull public final @NotNull BasedSequence baseSubSequence(int startIndex, int endIndex)
Description copied from interface:BasedSequenceGet a portion of this sequence's base sequenceNOTE: this means that if this sequence applies modifications to the original sequence then these modifications are NOT be applied to the returned sequence.
NOTE: It should only be implemented in classes which provide base sequences such as
CharSubSequenceandSubSequenceothers use inherited implementation ofBasedSequenceImpl- Specified by:
baseSubSequencein interfaceBasedSequence- Overrides:
baseSubSequencein classBasedSequenceImpl- Parameters:
startIndex- offset from 0 of original sequenceendIndex- offset from 0 of original sequence- Returns:
- based sequence whose contents reflect the selected portion
-
create
public static BasedSequence create(BasedSequence basedSequence, @NotNull @NotNull Iterable<? extends BasedSequence> segments)
UseBasedSequence.getBuilder()and thenISequenceBuilder.addAll(Iterable)or if you know which are based segments vs. out of base Strings then useBasedSegmentBuilderto construct segments directly.Use only if you absolutely need to use this old method because it calls the builder.addAll() for all the segments anyway.
If you need the location where content would have been use the FencedCodeBlock.getOpeningMarker().getEndOffset() + 1
- Parameters:
basedSequence- base sequence for the segmentssegments- list of based sequences to put into a based sequence- Returns:
- based sequence of segments. Result is a sequence which looks like
all the segments were concatenated, while still maintaining
the original offset for each character when using
BasedSequence.getIndexOffset(int)(int index)
-
create
public static BasedSequence create(BasedSequence... segments)
-
create
public static BasedSequence create(SequenceBuilder builder)
-
of
@Deprecated public static BasedSequence of(BasedSequence basedSequence, @NotNull @NotNull Iterable<? extends BasedSequence> segments)
Deprecated.useBasedSequence.getBuilder()and thenISequenceBuilder.addAll(Iterable)or if you know which are based segments vs. out of base Strings then useBasedSegmentBuilderto construct segments directly. If you absolutely need to use the old method then usecreate(BasedSequence, Iterable)- Parameters:
basedSequence- base sequence for the segmentssegments- list of based sequences to put into a based sequence- Returns:
- based sequence of segments. Result is a sequence which looks like
all the segments were concatenated, while still maintaining
the original offset for each character when using
BasedSequence.getIndexOffset(int)(int index)
-
of
@Deprecated public static BasedSequence of(BasedSequence... segments)
Deprecated.
-
-