Charray implements CharSequence, Cloneable, Appendable { @Override public Charray append(CharSequence csq) { if (csq == null) return append("null", 0, 4); return append(csq, 0, csq.length()); } Charray();  Charray(int initialCapacity);  Charray(char... chars);  Charray(char[] chars, int start, int end);  Charray(String str);  Charray(String str, int start, int end);  Charray(CharSequence csq);  Charray(CharSequence csq, int start, int end); boolean isEmpty(); @Override int length(); @Override char charAt(int index); char get(int index); void set(int index, char c); void replaceAll(char c, char replacement); @Override Charray append(CharSequence csq); @Override Charray append(CharSequence csq, int start, int end); @Override Charray append(char c); Charray append(String str); Charray append(String str, int start, int end); Charray append(Object o); Charray append(Charray cha); Charray append(Charray cha, int start, int end); Charray append(char[] array); Charray append(char[] array, int start, int end); boolean contains(char c); int indexOf(char c); int indexOfFirst(char... ch); boolean equalsIgnoreCase(CharSequence csq); boolean contentEquals(CharSequence csq); boolean contentEquals(char[] array); boolean contentEquals(Charray cha); boolean startsWith(CharSequence cs); @Override Charray subSequence(int start, int end); Charray sub(int start, int end); Charray sub(int start); void trim(); Charray trimmed(); CharacterInput asInput(); CharacterOutput asOutput(); @Override String toString(); @Override boolean equals(Object obj); @Override int hashCode(); @Override Charray clone();  }
@Test void testAppend() { Charray java = new Charray("java"); Charray scala = new Charray("scala"); Charray appended = java.append(scala); assertSame(java, appended); assertEquals(9, appended.length()); assertEquals("javascala", appended.toString()); assertEquals("scala", scala.toString()); appended.set(4, ' '); appended.set(5, 'v'); assertEquals("java vala", appended.toString()); assertEquals("scala", scala.toString()); appended = scala.append('3'); assertSame(scala, appended); assertEquals(6, scala.length()); assertEquals("scala3", scala.toString()); appended = scala.append(" is dotty"); assertSame(scala, appended); assertEquals("scala3 is dotty", scala.toString()); }