|
||||||||||
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.FlatRope
public final class FlatRope
A rope constructed from an underlying character sequence.
Field Summary |
---|
Fields inherited from interface org.ahmadsoft.ropes.Rope |
---|
BUILDER |
Constructor Summary | |
---|---|
FlatRope(java.lang.CharSequence sequence)
Constructs a new rope from an underlying character sequence. |
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()
|
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)
|
java.lang.String |
toString()
|
java.lang.String |
toString(int offset,
int length)
|
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 |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public FlatRope(java.lang.CharSequence sequence)
sequence
- 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 subSequence(int start, int end)
public java.lang.String toString()
toString
in interface java.lang.CharSequence
toString
in class AbstractRope
public java.lang.String toString(int offset, int length)
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.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |