|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.ahmadsoft.ropes.impl.AbstractRope org.ahmadsoft.ropes.impl.ReverseRope
public final class ReverseRope
A rope representing the reversal of character sequence. Internal implementation only.
Field Summary |
---|
Fields inherited from interface org.ahmadsoft.ropes.Rope |
---|
BUILDER |
Constructor Summary | |
---|---|
ReverseRope(Rope rope)
Constructs a new rope from an underlying rope. |
Method Summary | |
---|---|
char |
charAt(int index)
|
byte |
depth()
|
java.util.Iterator<java.lang.Character> |
iterator(int start)
Returns an iterator positioned to start at the specified index. |
int |
length()
|
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, rebalance, reverseIterator, startsWith, startsWith, toString, trim, trimEnd, trimStart, writeReplace |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ReverseRope(Rope rope)
Balancing algorithm works optimally when only FlatRopes or SubstringRopes are supplied. Framework must guarantee this as no runtime check is performed.
rope
- Method Detail |
---|
public char charAt(int index)
public byte depth()
depth
in class AbstractRope
public java.util.Iterator<java.lang.Character> iterator(int start)
Rope
start
- the start position.
public int length()
public 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
Rope
Writer
.
out
- the writer object.
java.io.IOException
public void write(java.io.Writer out, int offset, int length) throws java.io.IOException
Rope
Writer
.
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 |