public class DocumentCharacterIterator extends Object implements CharacterIterator, CharSequence
org.eclipse.jdt.internal.ui.text.DocumentCharacterIterator.DONE| Constructor and Description |
|---|
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). |
| Modifier and Type | Method and Description |
|---|---|
char |
charAt(int index) |
Object |
clone() |
char |
current() |
char |
first() |
int |
getBeginIndex() |
int |
getEndIndex() |
int |
getIndex() |
char |
last() |
int |
length() |
char |
next() |
char |
previous() |
char |
setIndex(int position) |
CharSequence |
subSequence(int start,
int end) |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waittoStringpublic DocumentCharacterIterator(org.eclipse.jface.text.IDocument document)
throws org.eclipse.jface.text.BadLocationException
document - the document backing this iteratororg.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 considerorg.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 considerorg.eclipse.jface.text.BadLocationException - if the indices are out of boundspublic char first()
first in interface CharacterIteratorpublic char last()
last in interface CharacterIteratorpublic char current()
current in interface CharacterIteratorpublic char next()
next in interface CharacterIteratorpublic char previous()
previous in interface CharacterIteratorpublic char setIndex(int position)
setIndex in interface CharacterIteratorpublic int getBeginIndex()
getBeginIndex in interface CharacterIteratorpublic int getEndIndex()
getEndIndex in interface CharacterIteratorpublic int getIndex()
getIndex in interface CharacterIteratorpublic Object clone()
clone in interface CharacterIteratorclone in class Objectpublic int length()
length in interface CharSequencepublic 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 CharSequenceindex - public CharSequence subSequence(int start, int end)
subSequence in interface CharSequenceCopyright © 2016. All Rights Reserved.