Package org.wildfly.common.string
Class CompositeCharSequence
- java.lang.Object
-
- org.wildfly.common.string.CompositeCharSequence
-
- All Implemented Interfaces:
Serializable,CharSequence
public class CompositeCharSequence extends Object implements CharSequence, Serializable
ACharSequencecomposed of other character sequences. All methods delegate to one or more of the underlying character sequences, using relative indexes.- Author:
- Paul Ferraro
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description CompositeCharSequence(CharSequence... sequences)Constructs a new composite character sequence.CompositeCharSequence(List<CharSequence> sequences)Constructs a new composite character sequence.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description charcharAt(int index)booleanequals(Object object)inthashCode()intlength()CharSequencesubSequence(int start, int end)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
-
-
-
-
Constructor Detail
-
CompositeCharSequence
public CompositeCharSequence(CharSequence... sequences)
Constructs a new composite character sequence.- Parameters:
sequences- an array of character sequences.
-
CompositeCharSequence
public CompositeCharSequence(List<CharSequence> sequences)
Constructs a new composite character sequence.- Parameters:
sequences- a list of character sequences.
-
-
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 start, int end)
- Specified by:
subSequencein interfaceCharSequence
-
toString
public String toString()
- Specified by:
toStringin interfaceCharSequence- Overrides:
toStringin classObject
-
-