char (int index) { for (CharSegment wrapper : myWrappers) { int length = wrapper.length(); if (index < length) { return wrapper.charAt(index); } index -= length; } throw new IndexOutOfBoundsException(); }