Class RepeatedSequence
java.lang.Object
com.vladsch.flexmark.util.sequence.RepeatedSequence
- All Implemented Interfaces:
CharSequence
CharSequence that repeats in a wraparound the given sequence.
Partial repeat occurs when start % length() >0 and/or end % length() >0
The hashCode is purposefully matched to the string equivalent or this.toString().hashCode()
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final CharSequenceprivate final intprivate intstatic RepeatedSequenceprivate final int -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateRepeatedSequence(CharSequence chars, int startIndex, int endIndex) -
Method Summary
Modifier and TypeMethodDescriptioncharcharAt(int index) booleaninthashCode()intlength()static @NotNull CharSequenceof(char c, int count) Deprecated.static @NotNull CharSequenceof(@NotNull CharSequence chars, int count) Deprecated.static @NotNull CharSequenceof(@NotNull CharSequence chars, int startIndex, int endIndex) Deprecated.static @NotNull CharSequenceofSpaces(int count) repeat(int count) static @NotNull CharSequencerepeatOf(char c, int count) static @NotNull CharSequencerepeatOf(@NotNull CharSequence chars, int count) static @NotNull CharSequencerepeatOf(@NotNull CharSequence chars, int startIndex, int endIndex) subSequence(int startIndex, int endIndex) @NotNull StringtoString()Methods inherited from interface CharSequence
chars, codePoints, getChars, isEmpty
-
Field Details
-
NULL
-
chars
-
startIndex
private final int startIndex -
endIndex
private final int endIndex -
hashCode
private int hashCode
-
-
Constructor Details
-
RepeatedSequence
-
-
Method Details
-
length
public int length()- Specified by:
lengthin interfaceCharSequence
-
charAt
public char charAt(int index) - Specified by:
charAtin interfaceCharSequence
-
subSequence
- Specified by:
subSequencein interfaceCharSequence
-
repeat
-
hashCode
-
equals
-
toString
- Specified by:
toStringin interfaceCharSequence- Overrides:
toStringin classObject
-
ofSpaces
-
repeatOf
-
repeatOf
@NotNull public static @NotNull CharSequence repeatOf(@NotNull @NotNull CharSequence chars, int count) -
repeatOf
@NotNull public static @NotNull CharSequence repeatOf(@NotNull @NotNull CharSequence chars, int startIndex, int endIndex) -
of
Deprecated. -
of
@NotNull @Deprecated public static @NotNull CharSequence of(@NotNull @NotNull CharSequence chars, int count) Deprecated. -
of
@NotNull @Deprecated public static @NotNull CharSequence of(@NotNull @NotNull CharSequence chars, int startIndex, int endIndex) Deprecated.
-