Searched refs:offset (Results 1 - 8 of 8) sorted by relevance

/ropes-1.1.3/src/org/ahmadsoft/ropes/impl/
H A DFlatRope.java33 * @param offset the offset.
38 public String toString(int offset, int length); argument
H A DSubstringRope.java39 private final int offset; field in class:SubstringRope
43 public SubstringRope(final FlatRope rope, final int offset, final int length) { argument
44 if (length < 0 || offset < 0 || offset + length > rope.length())
45 throw new IndexOutOfBoundsException("Invalid substring offset (" + offset + ") and length (" + length + ") for underlying rope with length " + rope.length());
48 this.offset = offset;
55 return this.rope.charAt(this.offset + index);
64 return this.offset;
157 write(final Writer out, final int offset, final int length) argument
[all...]
H A DFlatCharSequenceRope.java137 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 DReverseRope.java132 public void write(final Writer out, final int offset, final int length) throws IOException { argument
133 if (offset < 0 || offset + length > this.length())
134 throw new IndexOutOfBoundsException("Rope index out of bounds:" + (offset < 0 ? offset: offset + length));
135 for (int j=offset; j<offset + length; ++j)
H A DConcatenationRope.java198 public void write(final Writer out, final int offset, final int length) throws IOException { argument
199 if (offset + length < this.left.length()) {
200 this.left.write(out, offset, length);
201 } else if (offset >= this.left.length()) {
202 this.right.write(out, offset - this.left.length(), length);
204 final int writeLeft = this.left.length() - offset;
205 this.left.write(out, offset, writeLeft);
H A DFlatCharArrayRope.java52 * @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);
/ropes-1.1.3/src/org/ahmadsoft/ropes/test/
H A DPerformanceTest.java494 final int offset = appendPlan[j][0];
496 result = result.append(result.subSequence(offset, offset+length));
510 final int offset = prependPlan[j][0];
512 result = result.delete(offset, offset + length);
527 final int offset = insertPlan[j][1];
529 result = result.insert(into, result.subSequence(offset, offset+length));
545 final int offset
[all...]
/ropes-1.1.3/src/org/ahmadsoft/ropes/
H A DRope.java183 * in order, into this rope at the indicated offset.
188 * @param dstOffset the offset.
191 * @throws IndexOutOfBoundsException if the offset is invalid.
304 * @param offset the range offset.
307 public void write(Writer out, int offset, int length) throws IOException; argument

Completed in 6 milliseconds