/ropes-1.2.2/src/org/ahmadsoft/ropes/impl/ |
H A D | FlatRope.java | 33 * @param offset the offset.
38 public String toString(int offset, int length);
argument
|
H A D | SubstringRope.java | 39 private final int offset;
field in class:SubstringRope 42 public SubstringRope(final FlatRope rope, final int offset, final int length) {
argument 43 if (length < 0 || offset < 0 || offset + length > rope.length())
44 throw new IndexOutOfBoundsException("Invalid substring offset (" + offset + ") and length (" + length + ") for underlying rope with length " + rope.length());
47 this.offset = offset;
56 return this.rope.charAt(this.offset + index);
65 return this.offset;
158 write(final Writer out, final int offset, final int length) argument [all...] |
H A D | FlatCharSequenceRope.java | 137 public String toString(final int offset, final int length) {
argument 138 return this.sequence.subSequence(offset, offset + length).toString();
147 public void write(final Writer out, final int offset, final int length) throws IOException {
argument 148 if (offset < 0 || offset + length > this.length())
149 throw new IndexOutOfBoundsException("Rope index out of bounds:" + (offset < 0 ? offset: offset + length));
152 out.write(((String) this.sequence).substring(offset, offse [all...] |
H A D | ReverseRope.java | 130 public void write(final Writer out, final int offset, final int length) throws IOException {
argument 131 if (offset < 0 || offset + length > this.length())
132 throw new IndexOutOfBoundsException("Rope index out of bounds:" + (offset < 0 ? offset: offset + length));
133 for (int j=offset; j<offset + length; ++j)
|
H A D | ConcatenationRope.java | 195 public void write(final Writer out, final int offset, final int length) throws IOException {
argument 196 if (offset + length <= this.left.length()) {
197 this.left.write(out, offset, length);
198 } else if (offset >= this.left.length()) {
199 this.right.write(out, offset - this.left.length(), length);
201 final int writeLeft = this.left.length() - offset;
202 this.left.write(out, offset, writeLeft);
|
H A D | FlatCharArrayRope.java | 52 * @param offset the offset in the array.
55 public FlatCharArrayRope(final char[] sequence, final int offset, final int length) {
argument 59 System.arraycopy(sequence, offset, this.sequence, 0, length);
218 public String toString(final int offset, final int length) {
argument 219 return new String(this.sequence, offset, length);
228 public void write(final Writer out, final int offset, final int length) throws IOException {
argument 229 out.write(this.sequence, offset, length);
|
H A D | AbstractRope.java | 146 public boolean startsWith(CharSequence prefix, int offset) {
argument 147 if (offset < 0 || offset > this.length())
148 throw new IndexOutOfBoundsException("Rope offset out of range: " + offset);
149 if (offset + prefix.length() > this.length())
153 for (Iterator<Character> i=this.iterator(offset); i.hasNext() && x < prefix.length(); ) {
166 public boolean endsWith(CharSequence suffix, int offset) {
argument 167 return startsWith(suffix, length() - suffix.length() - offset);
|
/ropes-1.2.2/src/org/ahmadsoft/ropes/ |
H A D | Rope.java | 197 * in order, into this rope at the indicated offset.
202 * @param dstOffset the offset.
205 * @throws IndexOutOfBoundsException if the offset is invalid.
323 * @param offset the range offset.
326 public void write(Writer out, int offset, int length) throws IOException;
argument 390 * offset, starts with the specified prefix.
392 * @param offset the start offset.
396 public boolean startsWith(CharSequence prefix, int offset);
argument 416 endsWith(CharSequence suffix, int offset) argument [all...] |
/ropes-1.2.2/src/org/ahmadsoft/ropes/test/ |
H A D | PerformanceTest.java | 507 final int offset = appendPlan[j][0];
509 result = result.append(result.subSequence(offset, offset+length));
523 final int offset = prependPlan[j][0];
525 result = result.delete(offset, offset + length);
540 final int offset = insertPlan[j][1];
542 result = result.insert(into, result.subSequence(offset, offset+length));
558 final int offset [all...] |