Class RepeatedSequence
- java.lang.Object
-
- com.vladsch.flexmark.util.sequence.RepeatedSequence
-
- All Implemented Interfaces:
CharSequence
public class RepeatedSequence extends Object implements 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
Fields Modifier and Type Field Description static RepeatedSequenceNULL
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description charcharAt(int index)booleanequals(Object obj)inthashCode()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)RepeatedSequencerepeat(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)CharSequencesubSequence(int startIndex, int endIndex)@NotNull StringtoString()-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.lang.CharSequence
chars, codePoints
-
-
-
-
Field Detail
-
NULL
public static RepeatedSequence NULL
-
-
Method Detail
-
length
public int length()
- Specified by:
lengthin interfaceCharSequence
-
charAt
public char charAt(int index)
- Specified by:
charAtin interfaceCharSequence
-
subSequence
public CharSequence subSequence(int startIndex, int endIndex)
- Specified by:
subSequencein interfaceCharSequence
-
repeat
public RepeatedSequence repeat(int count)
-
toString
@NotNull public @NotNull String toString()
- Specified by:
toStringin interfaceCharSequence- Overrides:
toStringin classObject
-
ofSpaces
@NotNull public static @NotNull CharSequence ofSpaces(int count)
-
repeatOf
@NotNull public static @NotNull CharSequence repeatOf(char c, int count)
-
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
@NotNull @Deprecated public static @NotNull CharSequence of(char c, int count)
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.
-
-