|
|||||||||
| 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.FlatCharSequenceRope
public final class FlatCharSequenceRope
A rope constructed from an underlying character sequence.
| Field Summary |
|---|
| Fields inherited from interface org.ahmadsoft.ropes.Rope |
|---|
BUILDER |
| Constructor Summary | |
|---|---|
FlatCharSequenceRope(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 |
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)
|
java.lang.String |
toString()
|
java.lang.String |
toString(int offset,
int length)
Returns a String representation of a range
in this rope. |
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, matches, matches, padEnd, padEnd, padStart, padStart, rebalance, reverseIterator, startsWith, startsWith, trim, trimEnd, trimStart, writeReplace |
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.ahmadsoft.ropes.Rope |
|---|
append, append, append, delete, endsWith, endsWith, indexOf, indexOf, indexOf, indexOf, insert, isEmpty, matches, matches, padEnd, padEnd, padStart, padStart, rebalance, reverseIterator, startsWith, startsWith, trim, trimEnd, trimStart |
| Methods inherited from interface java.lang.Iterable |
|---|
iterator |
| Methods inherited from interface java.lang.Comparable |
|---|
compareTo |
| Constructor Detail |
|---|
public FlatCharSequenceRope(java.lang.CharSequence sequence)
sequence - | Method Detail |
|---|
public char charAt(int index)
charAt in interface java.lang.CharSequencepublic byte depth()
depth in class AbstractRopepublic java.util.Iterator<java.lang.Character> iterator(int start)
Rope
iterator in interface Ropestart - the start position.
public int length()
length in interface java.lang.CharSequencepublic java.util.regex.Matcher matcher(java.util.regex.Pattern pattern)
RopeMatcher m = pattern.matcher(this);The difference may be asymptotically better in some cases.
matcher in interface Ropematcher in class AbstractRopepattern - the pattern to match this rope against.
public Rope reverse()
Rope
reverse in interface Ropepublic java.util.Iterator<java.lang.Character> reverseIterator(int start)
Rope
reverseIterator in interface Ropestart - the start position.
Rope.reverseIterator()
public Rope subSequence(int start,
int end)
subSequence in interface java.lang.CharSequencesubSequence in interface Ropepublic java.lang.String toString()
toString in interface java.lang.CharSequencetoString in class AbstractRope
public java.lang.String toString(int offset,
int length)
String representation of a range
in this rope.
offset - the offset.length - the length.
String representation of a range
in this rope.
public void write(java.io.Writer out)
throws java.io.IOException
RopeWriter.
write in interface Ropeout - the writer object.
java.io.IOException
public void write(java.io.Writer out,
int offset,
int length)
throws java.io.IOException
RopeWriter.
write in interface Ropeout - 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 | ||||||||