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

public Class RichSequenceImpl

extends IRichSequenceBase<RichSequence>
implements RichSequence
Class Inheritance
All Implemented Interfaces
com.vladsch.flexmark.util.sequence.RichSequence, com.vladsch.flexmark.util.sequence.IRichSequence, com.vladsch.flexmark.util.sequence.SequenceUtils, java.lang.Comparable, java.lang.CharSequence
Imports
com.vladsch.flexmark.util.sequence.builder.ISequenceBuilder, .RichSequenceBuilder, com.vladsch.flexmark.util.sequence.mappers.CharMapper, org.jetbrains.annotations.NotNull, .Nullable

A RichSequence implementation

Note

'\0' changed to '�' use com.vladsch.flexmark.util.sequence.mappers.NullEncoder#decodeNull mapper to get original null chars.

Field Summary

Modifier and TypeField and Description
pack-priv final CharSequence

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public char
charAt(int
the index of the char value to be returned
index
)

Implements java.lang.CharSequence.charAt.

Returns the char value at the specified index.

pack-priv static RichSequence
create(CharSequence charSequence, int startIndex, int endIndex)

public @NotNull RichSequence[]
public <B extends ISequenceBuilder<B, RichSequence>> B
getBuilder()

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

Get a sequence builder for this sequence type

public int
length()

Implements java.lang.CharSequence.length.

Returns the length of this character sequence.

public @NotNull RichSequence
public static RichSequence
public static RichSequence
of(CharSequence charSequence, int startIndex)

Hides com.vladsch.flexmark.util.sequence.RichSequence.of.

Deprecated

public static RichSequence
of(CharSequence charSequence, int startIndex, int endIndex)

Hides com.vladsch.flexmark.util.sequence.RichSequence.of.

Deprecated

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

public @NotNull RichSequence
subSequence(int
offset from startIndex of this sequence
startIndex
,
int
offset from startIndex of this sequence
endIndex
)

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

Get a portion of this sequence

Note

the returned value should only depend on start/end indices.

public @NotNull RichSequence
Inherited from com.vladsch.flexmark.util.sequence.IRichSequenceBase:
appendappendappendEOLappendRangesToappendRangesToappendRangesToappendRangesToappendSpaceappendSpacesappendToappendToappendToappendToappendToappendToblankLinesRemovedRangesblankLinesRemovedRangesblankLinesRemovedRangesblankLinesRemovedRangescolumnAtIndexcompareTocountLeadingcountLeadingcountLeadingcountLeadingColumnscountLeadingNotcountLeadingNotcountLeadingNotcountLeadingNotSpacecountLeadingNotSpacecountLeadingNotSpacecountLeadingNotSpaceTabcountLeadingNotSpaceTabcountLeadingNotSpaceTabcountLeadingNotWhitespacecountLeadingNotWhitespacecountLeadingNotWhitespacecountLeadingSpacecountLeadingSpacecountLeadingSpacecountLeadingSpaceTabcountLeadingSpaceTabcountLeadingSpaceTabcountLeadingWhitespacecountLeadingWhitespacecountLeadingWhitespacecountOfAnycountOfAnycountOfAnycountOfAnyNotcountOfAnyNotcountOfAnyNotcountOfNotSpaceTabcountOfNotWhitespacecountOfSpaceTabcountOfWhitespacecountTrailingcountTrailingcountTrailingcountTrailingNotcountTrailingNotcountTrailingNotcountTrailingNotSpacecountTrailingNotSpacecountTrailingNotSpacecountTrailingNotSpaceTabcountTrailingNotSpaceTabcountTrailingNotSpaceTabcountTrailingNotWhitespacecountTrailingNotWhitespacecountTrailingNotWhitespacecountTrailingSpacecountTrailingSpacecountTrailingSpacecountTrailingSpaceTabcountTrailingSpaceTabcountTrailingSpaceTabcountTrailingWhitespacecountTrailingWhitespacecountTrailingWhitespacedeleteendCharAtendOfDelimitedByendOfDelimitedByAnyendOfDelimitedByAnyNotendOfLineendOfLineAnyEOLendSequenceendSequenceendsWithendsWithendsWithendsWithAnyEOLendsWithEOLendsWithIgnoreCaseendsWithSpaceendsWithSpaceTabendsWithWhitespaceeolEndLengtheolEndLengtheolEndRangeeolStartLengtheolStartRangeequalsequalsequalsIgnoreCaseextractRangesextractRangesfirstCharhashCodeifNullifNullEmptyAfterifNullEmptyBeforeindexOfindexOfindexOfindexOfindexOfindexOfindexOfAllindexOfAnyindexOfAnyindexOfAnyindexOfAnyNotindexOfAnyNotindexOfAnyNotindexOfNotindexOfNotindexOfNotinsertisBlankisCharAtisEmptyisInisInisNotBlankisNotEmptyisNotNullisNulllastCharlastIndexOflastIndexOflastIndexOflastIndexOflastIndexOflastIndexOflastIndexOfAnylastIndexOfAnylastIndexOfAnylastIndexOfAnyNotlastIndexOfAnyNotlastIndexOfAnyNotlastIndexOfNotlastIndexOfNotlastIndexOfNotleadingBlankLinesRangeleadingBlankLinesRangeleadingBlankLinesRangeleadingBlankLinesRangelineAtlineAtAnyEOLlineColumnAtIndexlineRangeAtlineRangeAtAnyEOLmatchCharsmatchCharsmatchCharsmatchCharsmatchCharsIgnoreCasematchCharsIgnoreCasematchCharsReversedmatchCharsReversedmatchCharsReversedIgnoreCasematchedCharCountmatchedCharCountmatchedCharCountmatchedCharCountmatchedCharCountmatchedCharCountIgnoreCasematchedCharCountIgnoreCasematchedCharCountReversedmatchedCharCountReversedmatchedCharCountReversedmatchedCharCountReversedmatchedCharCountReversedIgnoreCasematchedCharCountReversedIgnoreCasematchesmatchesmatchesIgnoreCasemidCharAtmidSequencemidSequencenormalizeEndWithEOLnormalizeEOLnullIfnullIfnullIfnullIfnullIfBlanknullIfEmptynullIfEndsWithnullIfEndsWithnullIfEndsWithIgnoreCasenullIfNotnullIfNotnullIfNotnullIfNotEndsWithnullIfNotEndsWithnullIfNotEndsWithIgnoreCasenullIfNotStartsWithnullIfNotStartsWithnullIfNotStartsWithIgnoreCasenullIfStartsWithnullIfStartsWithnullIfStartsWithIgnoreCasepaddingpaddingpadEndpadEndpadStartpadStartprefixOnceWithprefixOnceWithEOLprefixOnceWithSpaceprefixWithprefixWithEOLprefixWithSpaceprefixWithSpacesremovePrefixremovePrefixremovePrefixIgnoreCaseremoveProperPrefixremoveProperPrefixremoveProperPrefixIgnoreCaseremoveProperSuffixremoveProperSuffixremoveProperSuffixIgnoreCaseremoveSuffixremoveSuffixremoveSuffixIgnoreCasereplacereplacesafeCharAtsafeSubSequencesafeSubSequencesequenceOfsequenceOfsplitsplitsplitsplitsplitsplitEOLsplitEOLsplitListsplitListsplitListsplitListsplitListsplitListEOLsplitListEOLsplitListEOLstartOfDelimitedBystartOfDelimitedByAnystartOfDelimitedByAnyNotstartOfLinestartOfLineAnyEOLstartsWithstartsWithstartsWithstartsWithAnyEOLstartsWithEOLstartsWithIgnoreCasestartsWithSpacestartsWithSpaceTabstartsWithWhitespacesubSequencesubSequencesubSequenceAftersubSequenceBeforesubSequenceBeforeAftersuffixOnceWithsuffixOnceWithEOLsuffixOnceWithSpacesuffixWithsuffixWithEOLsuffixWithSpacesuffixWithSpacestoLowerCasetoNbSptoSpctoStringtoStringOrNulltoUpperCasetoVisibleWhitespaceStringtrailingBlankLinesRangetrailingBlankLinesRangetrailingBlankLinesRangetrailingBlankLinesRangetrimtrimtrimtrimtrimEndtrimEndtrimEndtrimEndtrimEndRangetrimEndRangetrimEndRangetrimEndRangetrimEOLtrimLeadBlankLinestrimmedtrimmedtrimmedtrimmedtrimmedEndtrimmedEndtrimmedEndtrimmedEndtrimmedEOLtrimmedStarttrimmedStarttrimmedStarttrimmedStarttrimRangetrimRangetrimRangetrimRangetrimStarttrimStarttrimStarttrimStarttrimStartRangetrimStartRangetrimStartRangetrimStartRangetrimTailBlankLinestrimToEndOfLinetrimToEndOfLinetrimToEndOfLinetrimToEndOfLinetrimToEndOfLinetrimToStartOfLinetrimToStartOfLinetrimToStartOfLinetrimToStartOfLinetrimToStartOfLinevalidateIndexvalidateIndexInclusiveEndvalidateStartEnd

Field Detail

charSequenceback to summary
pack-priv final CharSequence charSequence

Constructor Detail

RichSequenceImplback to summary
private RichSequenceImpl(CharSequence charSequence)

Method Detail

charAtback to summary
public char charAt(int index)

Implements java.lang.CharSequence.charAt.

Doc from java.lang.CharSequence.charAt.

Returns the char value at the specified index. An index ranges from zero to length() - 1. The first char value of the sequence is at index zero, the next at index one, and so on, as for array indexing.

If the char value specified by the index is a surrogate, the surrogate value is returned.

Parameters
index:int

the index of the char value to be returned

Returns:char

the specified char value

Annotations
@Override
createback to summary
pack-priv static RichSequence create(CharSequence charSequence, int startIndex, int endIndex)
emptyArrayback to summary
public @NotNull RichSequence[] emptyArray()

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

Annotations
@NotNull
@Override
getBuilderback to summary
public <B extends ISequenceBuilder<B, RichSequence>> B getBuilder()

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

Doc from com.vladsch.flexmark.util.sequence.IRichSequence.getBuilder.

Get a sequence builder for this sequence type

Parameters
<B>
type of builder
Returns:B

builder which can build this type of sequence

Annotations
@Override
@NotNull
lengthback to summary
public int length()

Implements java.lang.CharSequence.length.

Doc from java.lang.CharSequence.length.

Returns the length of this character sequence. The length is the number of 16-bit chars in the sequence.

Returns:int

the number of chars in this sequence

Annotations
@Override
nullSequenceback to summary
public @NotNull RichSequence nullSequence()

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

Annotations
@NotNull
@Override
ofback to summary
public static RichSequence of(CharSequence charSequence)

Hides com.vladsch.flexmark.util.sequence.RichSequence.of.

Deprecated

Annotations
@Deprecated
ofback to summary
public static RichSequence of(CharSequence charSequence, int startIndex)

Hides com.vladsch.flexmark.util.sequence.RichSequence.of.

Deprecated

Annotations
@Deprecated
ofback to summary
public static RichSequence of(CharSequence charSequence, int startIndex, int endIndex)

Hides com.vladsch.flexmark.util.sequence.RichSequence.of.

Deprecated

Annotations
@Deprecated
sequenceOfback to summary
public @NotNull RichSequence sequenceOf(@Nullable CharSequence charSequence, int startIndex, int endIndex)
Annotations
@NotNull
@Override
subSequenceback to summary
public @NotNull RichSequence subSequence(int startIndex, int endIndex)

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

Doc from com.vladsch.flexmark.util.sequence.IRichSequence.subSequence.

Get a portion of this sequence

Note

the returned value should only depend on start/end indices. If a subsequence of this sequence with matching start/end should equal (using equals()) all such subsequences of this sequence.

Parameters
startIndex:int

offset from startIndex of this sequence

endIndex:int

offset from startIndex of this sequence

Returns:@NotNull RichSequence

based sequence whose contents reflect the selected portion

Annotations
@NotNull
@Override
toMappedback to summary
public @NotNull RichSequence toMapped(CharMapper mapper)

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

Annotations
@NotNull
@Override