Package org.wildfly.common.string
Class CompositeCharSequence
java.lang.Object
org.wildfly.common.string.CompositeCharSequence
- All Implemented Interfaces:
Serializable,CharSequence
A
CharSequence composed of other character sequences.
All methods delegate to one or more of the underlying character sequences, using relative indexes.- Author:
- Paul Ferraro
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionCompositeCharSequence(CharSequence... sequences) Constructs a new composite character sequence.CompositeCharSequence(List<CharSequence> sequences) Constructs a new composite character sequence. -
Method Summary
Modifier and TypeMethodDescriptioncharcharAt(int index) booleaninthashCode()intlength()subSequence(int start, int end) toString()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.CharSequence
chars, codePoints, isEmpty
-
Constructor Details
-
CompositeCharSequence
Constructs a new composite character sequence.- Parameters:
sequences- an array of character sequences.
-
CompositeCharSequence
Constructs a new composite character sequence.- Parameters:
sequences- a list of character sequences.
-
-
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
-
hashCode
public int hashCode() -
equals
-
toString
- Specified by:
toStringin interfaceCharSequence- Overrides:
toStringin classObject
-