/ropes-1.2.2/src/org/ahmadsoft/ropes/impl/ |
H A D | RepeatedCharacterSequence.java | 54 public CharSequence subSequence(int start, int end) {
argument 55 return new RepeatedCharacterSequence(getCharacter(), end - start);
|
H A D | ReverseRope.java | 118 public Rope subSequence(final int start, final int end) {
argument 119 if (start == 0 && end == this.length())
121 return this.rope.subSequence(this.length() - end, this.length() - start).reverse();
|
H A D | ConcatenationRope.java | 112 public CharSequence subSequence(final int start, final int end) {
113 return rope.subSequence(start, end);
173 public Rope subSequence(final int start, final int end) {
argument 174 if (start < 0 || end > this.length())
175 throw new IllegalArgumentException("Illegal subsequence (" + start + "," + end + ")");
176 if (start == 0 && end == this.length())
179 if (end <= l)
180 return this.left.subSequence(start, end);
182 return this.right.subSequence(start - l, end - l);
185 this.right.subSequence(0, end [all...] |
H A D | FlatCharArrayRope.java | 202 public Rope subSequence(final int start, final int end) {
argument 203 if (start == 0 && end == this.length())
205 if (end - start < 16) {
206 return new FlatCharArrayRope(this.sequence, start, end-start);
208 return new SubstringRope(this, start, end-start);
|
H A D | FlatCharSequenceRope.java | 122 public Rope subSequence(final int start, final int end) {
argument 123 if (start == 0 && end == this.length())
125 if (end - start < 8 || this.sequence instanceof String /* special optimization for String */) {
126 return new FlatCharSequenceRope(this.sequence.subSequence(start, end));
128 return new SubstringRope(this, start, end-start);
|
H A D | RopeUtilities.java | 136 private Rope merge(ArrayList<Rope> leafNodes, int start, int end) {
argument 137 int range = end - start;
145 return new ConcatenationRope(merge(leafNodes, start, middle), merge(leafNodes, middle, end));
|
H A D | SubstringRope.java | 141 public Rope subSequence(final int start, final int end) {
argument 142 if (start == 0 && end == this.length())
144 return new SubstringRope(this.rope, this.offset + start, end-start);
|
H A D | AbstractRope.java | 54 public Rope append(final CharSequence csq, final int start, final int end) {
argument 55 return RopeUtilities.INSTANCE.concatenate(this, Rope.BUILDER.build(csq).subSequence(start, end));
72 public Rope delete(final int start, final int end) {
argument 73 if (start == end)
75 return this.subSequence(0, start).append(this.subSequence(end, this.length()));
|
/ropes-1.2.2/src/org/ahmadsoft/ropes/test/ |
H A D | RopeTest.java | 46 private String fromRope(Rope rope, int start, int end) {
argument 48 Writer out = new StringWriter(end - start);
49 rope.write(out, start, end - start);
|
/ropes-1.2.2/src/org/ahmadsoft/ropes/ |
H A D | Rope.java | 94 * @param end the end index, non-inclusive.
97 //@ requires start <= end && start > -1 && end <= csq.length();
98 //@ ensures \result.length() == (length() + (end-start));
99 Rope append(CharSequence csq, int start, int end);
argument 104 * the character at index <code>end - 1</code> or to the end of the
106 * <code>start</code> is equal to <code>end</code>, no changes are made.
109 * @param end Th 117 delete(int start, int end) argument 305 subSequence(int start, int end) argument [all...] |