|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eclipse.xtext.ui.editor.model.DocumentCharacterIterator
public class DocumentCharacterIterator
Copied from org.eclipse.jdt.internal.ui.text.DocumentCharacterIterator
.
DocumentCharacterIterator
Field Summary |
---|
Fields inherited from interface java.text.CharacterIterator |
---|
DONE |
Constructor Summary | |
---|---|
DocumentCharacterIterator(org.eclipse.jface.text.IDocument document)
Creates an iterator for the entire document. |
|
DocumentCharacterIterator(org.eclipse.jface.text.IDocument document,
int first)
Creates an iterator, starting at offset first . |
|
DocumentCharacterIterator(org.eclipse.jface.text.IDocument document,
int first,
int last)
Creates an iterator for the document contents from first (inclusive) to
last (exclusive). |
Method Summary | |
---|---|
char |
charAt(int index)
Note that, if the document is modified concurrently, this method may return CharacterIterator.DONE if a BadLocationException
was thrown when accessing the backing document. |
java.lang.Object |
clone()
|
char |
current()
|
char |
first()
|
int |
getBeginIndex()
|
int |
getEndIndex()
|
int |
getIndex()
|
char |
last()
|
int |
length()
|
char |
next()
|
char |
previous()
|
char |
setIndex(int position)
|
java.lang.CharSequence |
subSequence(int start,
int end)
|
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface java.lang.CharSequence |
---|
toString |
Constructor Detail |
---|
public DocumentCharacterIterator(org.eclipse.jface.text.IDocument document) throws org.eclipse.jface.text.BadLocationException
document
- the document backing this iterator
org.eclipse.jface.text.BadLocationException
- if the indices are out of boundspublic DocumentCharacterIterator(org.eclipse.jface.text.IDocument document, int first) throws org.eclipse.jface.text.BadLocationException
first
.
document
- the document backing this iteratorfirst
- the first character to consider
org.eclipse.jface.text.BadLocationException
- if the indices are out of boundspublic DocumentCharacterIterator(org.eclipse.jface.text.IDocument document, int first, int last) throws org.eclipse.jface.text.BadLocationException
first
(inclusive) to
last
(exclusive).
document
- the document backing this iteratorfirst
- the first character to considerlast
- the last character index to consider
org.eclipse.jface.text.BadLocationException
- if the indices are out of boundsMethod Detail |
---|
public char first()
first
in interface java.text.CharacterIterator
public char last()
last
in interface java.text.CharacterIterator
public char current()
current
in interface java.text.CharacterIterator
public char next()
next
in interface java.text.CharacterIterator
public char previous()
previous
in interface java.text.CharacterIterator
public char setIndex(int position)
setIndex
in interface java.text.CharacterIterator
public int getBeginIndex()
getBeginIndex
in interface java.text.CharacterIterator
public int getEndIndex()
getEndIndex
in interface java.text.CharacterIterator
public int getIndex()
getIndex
in interface java.text.CharacterIterator
public java.lang.Object clone()
clone
in interface java.text.CharacterIterator
clone
in class java.lang.Object
public int length()
length
in interface java.lang.CharSequence
public char charAt(int index)
Note that, if the document is modified concurrently, this method may
return CharacterIterator.DONE
if a BadLocationException
was thrown when accessing the backing document.
charAt
in interface java.lang.CharSequence
index
-
public java.lang.CharSequence subSequence(int start, int end)
subSequence
in interface java.lang.CharSequence
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |