@Test(expected = IndexOutOfBoundsException.class) public void testCharAtOutOfBounds() { final MutableCharArray seq = new MutableCharArray("Dawid Weiss".toCharArray(), 1, 3); assertEquals('-', seq.charAt(3)); }
public final char charAt(final int index) { if (index < 0 || index >= length) { throw new IndexOutOfBoundsException(); } return buffer[start + index]; }
MutableCharArray implements CharSequence, Cloneable { public final char charAt(final int index) { if (index < 0 || index >= length) { throw new IndexOutOfBoundsException(); } return buffer[start + index]; } }
MutableCharArray implements CharSequence, Cloneable { public final char charAt(final int index) { if (index < 0 || index >= length) { throw new IndexOutOfBoundsException(); } return buffer[start + index]; } MutableCharArray();  MutableCharArray(CharSequence seq);  MutableCharArray(char[] buffer);  MutableCharArray(char[] buffer, int start, int length); }
MutableCharArray implements CharSequence, Cloneable { public final char charAt(final int index) { if (index < 0 || index >= length) { throw new IndexOutOfBoundsException(); } return buffer[start + index]; } MutableCharArray();  MutableCharArray(CharSequence seq);  MutableCharArray(char[] buffer);  MutableCharArray(char[] buffer, int start, int length); void reset(CharSequence seq); void reset(char[] buffer); void reset(char[] buffer, int start, int length); char[] getBuffer(); int getStart(); final char charAt(final int index); int length(); MutableCharArray subSequence(int start, int end); @Override String toString(); @Override int hashCode(); @Override boolean equals(Object other); static final int hashCode(final char[] buffer, int start, int length); MutableCharArray clone(); char[] toArray(); }
MutableCharArray implements CharSequence, Cloneable { public final char charAt(final int index) { if (index < 0 || index >= length) { throw new IndexOutOfBoundsException(); } return buffer[start + index]; } MutableCharArray();  MutableCharArray(CharSequence seq);  MutableCharArray(char[] buffer);  MutableCharArray(char[] buffer, int start, int length); void reset(CharSequence seq); void reset(char[] buffer); void reset(char[] buffer, int start, int length); char[] getBuffer(); int getStart(); final char charAt(final int index); int length(); MutableCharArray subSequence(int start, int end); @Override String toString(); @Override int hashCode(); @Override boolean equals(Object other); static final int hashCode(final char[] buffer, int start, int length); MutableCharArray clone(); char[] toArray();  }