public class RepeatedCharSequence extends Object implements CharSequence
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()
| Modifier and Type | Field and Description |
|---|---|
static RepeatedCharSequence |
NULL |
| Modifier and Type | Method and Description |
|---|---|
char |
charAt(int index) |
boolean |
equals(Object obj) |
int |
hashCode() |
int |
length() |
static RepeatedCharSequence |
of(char c,
int count) |
static RepeatedCharSequence |
of(CharSequence chars,
int count) |
static RepeatedCharSequence |
of(CharSequence chars,
int start,
int end) |
RepeatedCharSequence |
repeat(int count) |
CharSequence |
subSequence(int start,
int end) |
String |
toString() |
clone, finalize, getClass, notify, notifyAll, wait, wait, waitchars, codePointspublic static RepeatedCharSequence NULL
public int length()
length in interface CharSequencepublic char charAt(int index)
charAt in interface CharSequencepublic CharSequence subSequence(int start, int end)
subSequence in interface CharSequencepublic RepeatedCharSequence repeat(int count)
public String toString()
toString in interface CharSequencetoString in class Objectpublic static RepeatedCharSequence of(char c, int count)
public static RepeatedCharSequence of(CharSequence chars, int count)
public static RepeatedCharSequence of(CharSequence chars, int start, int end)
Copyright © 2018. All rights reserved.