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

public Class MappedRichSequence

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

A CharSequence that maps characters according to CharMapper

Field Summary

Modifier and TypeField and Description
private final RichSequence
private final CharMapper

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.

public @NotNull RichSequence[]
public 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 @NotNull CharMapper
public @NotNull RichSequence
public int
length()

Implements java.lang.CharSequence.length.

Returns the length of this character sequence.

public static RichSequence
mappedOf(CharMapper mapper, RichSequence baseSeq)

public static RichSequence
mappedOf(CharMapper mapper, RichSequence baseSeq, int startIndex)

public static RichSequence
mappedOf(CharMapper mapper, RichSequence baseSeq, int startIndex, int endIndex)

public @NotNull RichSequence
public @NotNull RichSequence
sequenceOf(@Nullable CharSequence baseSeq, 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, java.lang.CharSequence.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

baseback to summary
private final RichSequence base
mapperback to summary
private final CharMapper mapper

Constructor Detail

MappedRichSequenceback to summary
private MappedRichSequence(CharMapper mapper, RichSequence baseSeq)

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
emptyArrayback to summary
public @NotNull RichSequence[] emptyArray()

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

Annotations
@NotNull
@Override
getBaseSequenceback to summary
public RichSequence getBaseSequence()
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
getCharMapperback to summary
public @NotNull CharMapper getCharMapper()

Implements com.vladsch.flexmark.util.sequence.MappedSequence.getCharMapper.

Annotations
@NotNull
@Override
getCharSequenceback to summary
public @NotNull RichSequence getCharSequence()

Implements com.vladsch.flexmark.util.sequence.MappedSequence.getCharSequence.

Annotations
@NotNull
@Override
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
mappedOfback to summary
public static RichSequence mappedOf(CharMapper mapper, RichSequence baseSeq)
mappedOfback to summary
public static RichSequence mappedOf(CharMapper mapper, RichSequence baseSeq, int startIndex)
mappedOfback to summary
public static RichSequence mappedOf(CharMapper mapper, RichSequence baseSeq, int startIndex, int endIndex)
nullSequenceback to summary
public @NotNull RichSequence nullSequence()

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

Annotations
@NotNull
@Override
sequenceOfback to summary
public @NotNull RichSequence sequenceOf(@Nullable CharSequence baseSeq, 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, java.lang.CharSequence.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