Searched refs:Rope (Results 1 - 16 of 16) sorted by relevance

/ropes-1.2.5/src/org/ahmadsoft/ropes/
H A DRopeBuilder.java39 public Rope build(final char[] sequence) {
48 public Rope build(final CharSequence sequence) {
49 if (sequence instanceof Rope)
50 return (Rope) sequence;
H A DRope.java2 * Rope.java
39 * Rope operations, unlike string operations, scale well to very
63 /*@ pure @*/ public interface Rope extends CharSequence, Iterable<Character>, Comparable<CharSequence>, Serializable { interface in inherits:CharSequence,Iterable,Comparable,Serializable
77 Rope append(char c);
87 Rope append(CharSequence suffix);
99 Rope append(CharSequence csq, int start, int end);
117 Rope delete(int start, int end);
122 * in the character sequence represented by this <code>Rope</code>
142 * represented by this <code>Rope</code> object, then the index of the
204 * @return a reference to the new Rope
[all...]
/ropes-1.2.5/src/org/ahmadsoft/ropes/impl/
H A DFlatRope.java29 interface FlatRope extends org.ahmadsoft.ropes.Rope {
H A DRopeUtilities.java29 import org.ahmadsoft.ropes.Rope;
50 public Rope autoRebalance(final Rope r) {
65 Rope concatenate(final Rope left, final Rope right) {
101 byte depth(final Rope r) {
110 boolean isBalanced(final Rope r) {
116 public Rope rebalance(final Rope
[all...]
H A DSerializedRope.java31 import org.ahmadsoft.ropes.Rope;
49 private Rope rope;
61 public SerializedRope(final Rope rope) {
70 this.rope = Rope.BUILDER.build(in.readUTF());
H A DConcatenationRopeReverseIteratorImpl.java28 import org.ahmadsoft.ropes.Rope;
40 private final ArrayDeque<Rope> toTraverse;
41 private final Rope rope;
42 private Rope currentRope;
48 public ConcatenationRopeReverseIteratorImpl(final Rope rope) {
52 public ConcatenationRopeReverseIteratorImpl(final Rope rope, final int start) {
54 this.toTraverse = new ArrayDeque<Rope>();
60 throw new IllegalArgumentException("Rope index out of range: " + start);
138 throw new UnsupportedOperationException("Rope iterator is read-only.");
H A DAbstractRope.java33 import org.ahmadsoft.ropes.Rope;
39 public abstract class AbstractRope implements Rope {
44 public Rope append(final char c) {
45 return RopeUtilities.INSTANCE.concatenate(this, Rope.BUILDER.build(String.valueOf(c)));
49 public Rope append(final CharSequence suffix) {
50 return RopeUtilities.INSTANCE.concatenate(this, Rope.BUILDER.build(suffix));
54 public Rope append(final CharSequence csq, final int start, final int end) {
55 return RopeUtilities.INSTANCE.concatenate(this, Rope.BUILDER.build(csq).subSequence(start, end));
72 public Rope delete(final int start, final int end) {
86 if (other instanceof Rope) {
[all...]
H A DConcatenationRopeIteratorImpl.java28 import org.ahmadsoft.ropes.Rope;
40 private final ArrayDeque<Rope> toTraverse;
41 private Rope currentRope;
47 public ConcatenationRopeIteratorImpl(final Rope rope) {
51 public ConcatenationRopeIteratorImpl(final Rope rope, final int start) {
52 this.toTraverse = new ArrayDeque<Rope>();
58 throw new IllegalArgumentException("Rope index out of range: " + start);
139 throw new UnsupportedOperationException("Rope iterator is read-only.");
H A DConcatenationRope.java29 import org.ahmadsoft.ropes.Rope;
37 private final Rope left;
38 private final Rope right;
47 public ConcatenationRope(final Rope left, final Rope right) {
57 throw new IndexOutOfBoundsException("Rope index out of range: " + index);
79 private CharSequence getForSequentialAccess(final Rope rope) {
92 System.out.println("Rope length is: " + rope.length() + " charAt is " + index);
123 public Rope getLeft() {
131 public Rope getRigh
[all...]
H A DReverseRope.java29 import org.ahmadsoft.ropes.Rope;
38 private final Rope rope;
48 public ReverseRope(final Rope rope) {
65 throw new IndexOutOfBoundsException("Rope index out of range: " + start);
80 throw new UnsupportedOperationException("Rope iterator is read-only.");
91 public Rope reverse() {
97 throw new IndexOutOfBoundsException("Rope index out of range: " + start);
112 throw new UnsupportedOperationException("Rope iterator is read-only.");
118 public Rope subSequence(final int start, final int end) {
132 throw new IndexOutOfBoundsException("Rope inde
[all...]
H A DSubstringRope.java29 import org.ahmadsoft.ropes.Rope;
54 throw new IndexOutOfBoundsException("Rope index out of range: " + index);
72 public Rope getRope() {
79 throw new IndexOutOfBoundsException("Rope index out of range: " + start);
110 public Rope reverse() {
117 throw new IndexOutOfBoundsException("Rope index out of range: " + start);
141 public Rope subSequence(final int start, final int end) {
H A DFlatCharSequenceRope.java31 import org.ahmadsoft.ropes.Rope;
62 throw new IndexOutOfBoundsException("Rope index out of range: " + start);
77 throw new UnsupportedOperationException("Rope iterator is read-only.");
94 public Rope reverse() {
101 throw new IndexOutOfBoundsException("Rope index out of range: " + start);
116 throw new UnsupportedOperationException("Rope iterator is read-only.");
122 public Rope subSequence(final int start, final int end) {
149 throw new IndexOutOfBoundsException("Rope index out of bounds:" + (offset < 0 ? offset: offset + length));
H A DFlatCharArrayRope.java30 import org.ahmadsoft.ropes.Rope;
93 throw new IndexOutOfBoundsException("Rope index out of range: " + fromIndex);
148 throw new IndexOutOfBoundsException("Rope index out of range: " + start);
163 throw new UnsupportedOperationException("Rope iterator is read-only.");
174 public Rope reverse() {
181 throw new IndexOutOfBoundsException("Rope index out of range: " + start);
196 throw new UnsupportedOperationException("Rope iterator is read-only.");
202 public Rope subSequence(final int start, final int end) {
/ropes-1.2.5/src/org/ahmadsoft/ropes/test/
H A DRopeTest.java38 import org.ahmadsoft.ropes.Rope;
46 private String fromRope(Rope rope, int start, int end) {
59 Rope rope = Rope.BUILDER.build(s.toCharArray()); // bugs
67 rope = Rope.BUILDER.build(s); // no bugs
78 Rope r = Rope.BUILDER.build("");
98 Rope x1 = Rope.BUILDER.build("01");
111 Rope x
[all...]
H A DPerformanceTest.java39 import org.ahmadsoft.ropes.Rope;
60 private static Rope complexRope=null;
105 stat(System.out, stats2, "ns", "[Rope]");
131 stat(System.out, stats2, "ns", "[Rope]");
158 stat(System.out, stats2, "ns", "[Rope]");
188 stat(System.out, stats2, "ns", "[Rope]");
214 stat(System.out, stats2, "ns", "[Rope]");
236 stat(System.out, stats2, "ns", "[Rope/charAt]");
237 stat(System.out, stats3, "ns", "[Rope/itr]");
260 stat(System.out, stats2, "ns", "[Rope/charA
[all...]
/ropes-1.2.5/
H A Dropes.jarMETA-INF/ META-INF/MANIFEST.MF org/ org/ahmadsoft/ org/ahmadsoft/ropes/ org/ahmadsoft/ropes/impl/ ...

Completed in 35 milliseconds