|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.ahmadsoft.ropes.impl.AbstractRope
org.ahmadsoft.ropes.impl.ConcatenationRope
public final class ConcatenationRope
A rope that represents the concatenation of two other ropes.
| Field Summary |
|---|
| Fields inherited from interface org.ahmadsoft.ropes.Rope |
|---|
BUILDER |
| Constructor Summary | |
|---|---|
ConcatenationRope(Rope left,
Rope right)
Create a new concatenation rope from two ropes. |
|
| Method Summary | |
|---|---|
char |
charAt(int index)
|
byte |
depth()
|
java.lang.CharSequence |
getForSequentialAccess()
A utility method that returns an instance of this rope optimized for sequential access. |
Rope |
getLeft()
Return the left-hand rope. |
Rope |
getRight()
Return the right-hand rope. |
java.util.Iterator<java.lang.Character> |
iterator(int start)
Returns an iterator positioned to start at the specified index. |
int |
length()
|
Rope |
rebalance()
Rebalances the current rope, returning the rebalanced rope. |
Rope |
reverse()
Reverses this rope. |
java.util.Iterator<java.lang.Character> |
reverseIterator(int start)
Returns a reverse iterator positioned to start at the specified index. |
Rope |
subSequence(int start,
int end)
|
void |
write(java.io.Writer out)
Write this rope to a Writer. |
void |
write(java.io.Writer out,
int offset,
int length)
Write a range of this rope to a Writer. |
| Methods inherited from class org.ahmadsoft.ropes.impl.AbstractRope |
|---|
append, append, append, compareTo, delete, endsWith, endsWith, equals, hashCode, indexOf, indexOf, indexOf, indexOf, insert, isEmpty, iterator, matcher, matches, matches, padEnd, padEnd, padStart, padStart, reverseIterator, startsWith, startsWith, toString, trim, trimEnd, trimStart, writeReplace |
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ConcatenationRope(Rope left,
Rope right)
left - the first rope.right - the second rope.| Method Detail |
|---|
public char charAt(int index)
public byte depth()
depth in class AbstractRopepublic java.lang.CharSequence getForSequentialAccess()
AbstractRope
public Rope getLeft()
public Rope getRight()
public java.util.Iterator<java.lang.Character> iterator(int start)
Rope
start - the start position.
public int length()
public Rope rebalance()
Rope
rebalance in interface Roperebalance in class AbstractRopepublic Rope reverse()
Rope
public java.util.Iterator<java.lang.Character> reverseIterator(int start)
Rope
start - the start position.
Rope.reverseIterator()
public Rope subSequence(int start,
int end)
public void write(java.io.Writer out)
throws java.io.IOException
RopeWriter.
out - the writer object.
java.io.IOException
public void write(java.io.Writer out,
int offset,
int length)
throws java.io.IOException
RopeWriter.
out - the writer object.offset - the range offset.length - the range length.
java.io.IOException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||