Package org.fife.ui.rtextarea
Class RDocumentCharSequence
java.lang.Object
org.fife.ui.rtextarea.RDocumentCharSequence
- All Implemented Interfaces:
CharSequence
Allows iterating over a portion of an
RDocument
. This is of
course not thread-safe, so should only be used on the EDT or with external
synchronization.- Version:
- 1.0
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionRDocumentCharSequence
(RDocument doc, int start) Creates aCharSequence
representing the text in a document from the specified offset to the end of that document.RDocumentCharSequence
(RDocument doc, int start, int end) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionchar
charAt
(int index) int
length()
subSequence
(int start, int end) toString()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.lang.CharSequence
chars, codePoints, isEmpty
-
Field Details
-
doc
-
start
private int start -
end
private int end
-
-
Constructor Details
-
RDocumentCharSequence
RDocumentCharSequence(RDocument doc, int start) Creates aCharSequence
representing the text in a document from the specified offset to the end of that document.- Parameters:
doc
- The document.start
- The starting offset in the document, inclusive.
-
RDocumentCharSequence
RDocumentCharSequence(RDocument doc, int start, int end) Constructor.- Parameters:
doc
- The document.start
- The starting offset in the document, inclusive.end
- the ending offset in the document, exclusive.
-
-
Method Details
-
charAt
public char charAt(int index) - Specified by:
charAt
in interfaceCharSequence
-
length
public int length()- Specified by:
length
in interfaceCharSequence
-
subSequence
- Specified by:
subSequence
in interfaceCharSequence
-
toString
- Specified by:
toString
in interfaceCharSequence
- Overrides:
toString
in classObject
-