|
||||||||||
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 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()
|
Rope |
getLeft()
Return the left-hand rope. |
java.lang.CharSequence |
getRegexpCharSeq(Rope 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()
|
java.util.regex.Matcher |
matcher(java.util.regex.Pattern pattern)
Creates a matcher that will match this rope against the specified pattern. |
Rope |
rebalance()
Rebalances the current rope, returning the rebalanced rope. |
Rope |
subSequence(int start,
int end)
|
void |
write(java.io.Writer out)
Write this rope. |
void |
write(java.io.Writer out,
int offset,
int length)
Write this rope. |
Methods inherited from class org.ahmadsoft.ropes.impl.AbstractRope |
---|
append, append, append, compareTo, delete, equals, hashCode, indexOf, insert, iterator, toString |
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 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 subSequence(int start, int end)
public Rope rebalance()
Rope
public void write(java.io.Writer out) throws java.io.IOException
Rope
java.io.IOException
public void write(java.io.Writer out, int offset, int length) throws java.io.IOException
Rope
java.io.IOException
public java.util.regex.Matcher matcher(java.util.regex.Pattern pattern)
Rope
Matcher m = pattern.matcher(this);The difference may be asymptotically better in many cases.
pattern
- the pattern to match this rope against.
public java.lang.CharSequence getRegexpCharSeq(Rope rope)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |