ImmutableText (int start, int end) { if (start < 0 || start > end || end > length()) { throw new IndexOutOfBoundsException(); } if (start == 0 && end == length()) { return this; } if (start == end) { return EMPTY; } return new ImmutableText(myNode.subSequence(start, end)); }