Searched refs:length (Results 1 - 13 of 13) sorted by relevance

/ropes-1.1.3/src/org/ahmadsoft/ropes/impl/
H A DSubstringRope.java40 private final int length; 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());
49 this.length
104 public int length() { method in class:SubstringRope
157 write(final Writer out, final int offset, final int length) argument
[all...]
H A DFlatCharArrayRope.java46 this(sequence, 0, sequence.length);
53 * @param length the length of the array.
55 public FlatCharArrayRope(final char[] sequence, final int offset, final int length) { argument
56 if (length > sequence.length)
57 throw new IllegalArgumentException("Length must be less than " + sequence.length);
58 this.sequence = new char[length];
59 System.arraycopy(sequence, offset, this.sequence, 0, length);
79 for (int j=0; j<this.sequence.length;
169 public int length() { method in class:FlatCharArrayRope
218 toString(final int offset, final int length) argument
228 write(final Writer out, final int offset, final int length) argument
[all...]
H A DReverseRope.java56 return this.rope.charAt(this.length() - index - 1);
66 if (start < 0 || start > this.length())
72 return this.current < ReverseRope.this.length();
88 public int length() { method in class:ReverseRope
89 return this.rope.length();
98 if (start < 0 || start > this.length())
101 int current = ReverseRope.this.length() - start;
121 if (start == 0 && end == this.length())
123 return this.rope.subSequence(this.length() - end, this.length()
132 write(final Writer out, final int offset, final int length) argument
[all...]
H A DConcatenationRope.java40 private final int length; field in class:ConcatenationRope
51 this.length = left.length() + right.length();
56 if (index < 0 || index >= this.length())
59 if (index < this.left.length())
62 return this.right.charAt(index - this.left.length());
95 System.out.println("Rope length is: " + rope.length() + " charAt is " + index);
110 public int length() {
150 public int length() { method in class:ConcatenationRope
198 write(final Writer out, final int offset, final int length) argument
[all...]
H A DFlatCharSequenceRope.java61 if (start < 0 || start > this.length())
67 return this.current < FlatCharSequenceRope.this.length();
83 public int length() { method in class:FlatCharSequenceRope
84 return this.sequence.length();
100 if (start < 0 || start > this.length())
103 int current = FlatCharSequenceRope.this.length() - start;
123 if (start == 0 && end == this.length())
137 public String toString(final int offset, final int length) { argument
138 return this.sequence.subSequence(offset, offset + length).toString();
143 this.write(out, 0, this.length());
147 write(final Writer out, final int offset, final int length) argument
[all...]
H A DFlatRope.java34 * @param length the length.
38 public String toString(int offset, int length); argument
H A DAbstractRope.java60 final int compareTill = Math.min(sequence.length(), this.length());
68 return this.length() - sequence.length();
75 return this.subSequence(0, start).append(this.subSequence(end, this.length()));
88 if (rope.hashCode() != this.hashCode() || rope.length() != this.length())
115 if (this.hashCode == 0 && this.length() > 0) {
116 if (this.length() < 6) {
123 this.hashCode = 31 * this.hashCode + this.charAt(this.length()
[all...]
H A DRopeUtilities.java65 if (left.length() == 0)
67 if (right.length() == 0)
72 if (fLeft.length() + fRight.length() < 16) {
82 if (fLeftRight.length() + fRight.length() < 16) {
93 if (fLeft.length() + cRightLeft.length() < 16) {
116 if (depth >= RopeUtilities.FIBONACCI.length - 2)
118 return (RopeUtilities.FIBONACCI[depth + 2] <= r.length());
[all...]
H A DConcatenationRopeReverseIteratorImpl.java59 if (start < 0 || start > rope.length()) {
66 return (this.currentRopePos + amount <= this.currentRope.length());
93 this.currentRopePos = this.currentRope.length();
94 this.currentAbsolutePos = this.rope.length();
122 this.currentRopePos = this.currentRope.length();
H A DConcatenationRopeIteratorImpl.java57 if (start < 0 || start > rope.length()) {
73 return this.currentRopePos < this.currentRope.length() - 1 || !this.toTraverse.isEmpty();
106 final int available = this.currentRope.length() - this.currentRopePos - 1;
/ropes-1.1.3/src/org/ahmadsoft/ropes/test/
H A DPerformanceTest.java65 if (args.length == 1) {
77 System.out.println("Read " + aChristmasCarol.length() + " bytes in " + PerformanceTest.time(x,y));
85 for (int j=0;j<deletePlan.length;++j) {
91 for (int k=20; k<=deletePlan.length; k+=20) {
92 System.out.println("Delete plan length: " + k);
111 for (int j=0;j<prependPlan.length;++j) {
116 for (int k=20; k<=prependPlan.length; k+=20) {
117 System.out.println("Prepend plan length: " + k);
136 for (int j=0;j<appendPlan.length;++j) {
142 for (int k=20; k<=appendPlan.length;
[all...]
H A DRopeTest.java78 for (int j = 0; j < c2.length(); ++j) {
79 assertTrue("Has next (" + j + "/" + c2.length() + ")", i.hasNext());
97 for (int j=0; j<=z3.length(); ++j) {
104 assertTrue(4 == z4.length());
105 for (int j=0; j<=z4.length(); ++j) {
232 Assert.assertEquals("alphabeta", r1.insert(r1.length(), "beta").toString());
/ropes-1.1.3/src/org/ahmadsoft/ropes/
H A DRope.java107 * is negative, greater than <code>length()</code>, or
305 * @param length the range length.
307 public void write(Writer out, int offset, int length) throws IOException; argument

Completed in 11 milliseconds