Searched defs:rope (Results 1 - 8 of 8) sorted by relevance

/ropes-1.2.5/src/org/ahmadsoft/ropes/impl/
H A DSerializedRope.java37 * flat rope.
40 * mechanism for Ropes. The ideal serial form of a rope is as a String,
47 * The rope.
49 private Rope rope; field in class:SerializedRope
57 * Create a new concatenation rope from two ropes.
58 * @param left the first rope.
59 * @param right the second rope.
61 public SerializedRope(final Rope rope) { argument
62 this.rope = rope;
[all...]
H A DReverseRope.java32 * A rope representing the reversal of character sequence.
38 private final Rope rope; field in class:ReverseRope
41 * Constructs a new rope from an underlying rope.
46 * @param rope
48 public ReverseRope(final Rope rope) { argument
49 this.rope = rope;
54 return this.rope.charAt(this.length() - index - 1);
59 return RopeUtilities.INSTANCE.depth(this.rope);
[all...]
H A DConcatenationRope.java32 * A rope that represents the concatenation of two other ropes.
43 * Create a new concatenation rope from two ropes.
44 * @param left the first rope.
45 * @param right the second rope.
79 private CharSequence getForSequentialAccess(final Rope rope) { argument
82 private final ConcatenationRopeIteratorImpl iterator = (ConcatenationRopeIteratorImpl) rope.iterator(0);
92 System.out.println("Rope length is: " + rope.length() + " charAt is " + index);
101 return rope.charAt(index);
108 return rope.length();
113 return rope
[all...]
H A DConcatenationRopeIteratorImpl.java32 * rope structure is guaranteed to be O(n) so long as it is reasonably
47 public ConcatenationRopeIteratorImpl(final Rope rope) { argument
48 this(rope, 0);
51 public ConcatenationRopeIteratorImpl(final Rope rope, final int start) { argument
53 this.toTraverse.push(rope);
57 if (start < 0 || start > rope.length()) {
114 throw new IllegalArgumentException("Unable to move forward " + amount + ". Reached end of rope.");
H A DConcatenationRopeReverseIteratorImpl.java32 * a complex rope structure is guaranteed to be O(n) so long as it
41 private final Rope rope; field in class:ConcatenationRopeReverseIteratorImpl
48 public ConcatenationRopeReverseIteratorImpl(final Rope rope) { argument
49 this(rope, 0);
52 public ConcatenationRopeReverseIteratorImpl(final Rope rope, final int start) { argument
53 this.rope = rope;
55 this.toTraverse.push(rope);
59 if (start < 0 || start > rope.length()) {
94 this.currentAbsolutePos = this.rope
[all...]
H A DSubstringRope.java32 * Represents a lazily-evaluated substring of another rope. For performance
33 * reasons, the target rope must be a <code>FlatRope</code>.
38 private final FlatRope rope; 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());
46 this.rope = rope;
56 return this.rope
[all...]
/ropes-1.2.5/src/org/ahmadsoft/ropes/test/
H A DRopeTest.java46 private String fromRope(Rope rope, int start, int end) { argument
49 rope.write(out, start, end - start);
59 Rope rope = Rope.BUILDER.build(s.toCharArray()); // bugs
61 rope = rope.delete(0, 1);
62 assertEquals("23", fromRope(rope, 0, 2));
63 assertEquals("", fromRope(rope, 0, 0));
64 assertEquals("902", fromRope(rope, 7, 10));
67 rope = Rope.BUILDER.build(s); // no bugs
68 rope
[all...]
/ropes-1.2.5/
H A Dropes.jar ... lang.CharSequence getForSequentialAccess (org.ahmadsoft.ropes.Rope) org.ahmadsoft.ropes.Rope rope public org ...

Completed in 7 milliseconds