public class TextCharacterIterator
extends java.lang.Object
implements java.text.CharacterIterator
TextCharacterIterator implements the
CharacterIterater protocol for an array of characters.| 修飾子とタイプ | フィールドと説明 |
|---|---|
protected char[] |
array
the array of characters to be iterated over.
|
protected int |
begin
the beginning index of the text.
|
protected int |
end
the ending index of the text.
|
protected int |
pos
the position of the text.
|
protected Text |
text
the text to be iterated over.
|
| コンストラクタと説明 |
|---|
TextCharacterIterator(char[] array)
Construct an iterator over the specified array of characters,
with an initial index of 0.
|
TextCharacterIterator(char[] array,
int pos)
Construct an iterator over the specified array of characters,
with the specified initial index.
|
TextCharacterIterator(char[] array,
int begin,
int end,
int pos)
Construct an iterator over the specified range of the specified array
of characters, with the index set at the specified position.
|
TextCharacterIterator(Text text)
Construct an iterator over the specified text object,
with an initial index of 0.
|
TextCharacterIterator(Text text,
int pos)
Construct an iterator over the specified text object,
with the specified initial index.
|
TextCharacterIterator(Text text,
int begin,
int end,
int pos)
Construct an iterator over the specified range of the specified text
object, with the index set at the specified position.
|
| 修飾子とタイプ | メソッドと説明 |
|---|---|
java.lang.Object |
clone()
Returns a clone of this object.
|
char |
current()
Returns the character at the current position
(as returned by getIndex()).
|
boolean |
equals(java.lang.Object anObject)
Compares two objects for equality.
|
char |
first()
Set the position to getBeginIndex() and return the character at that
position.
|
int |
getBeginIndex()
Return the start index of the array of characters.
|
int |
getEndIndex()
Return the end index of the array of characters.
|
int |
getIndex()
Return the current index.
|
Text |
getText()
Returns the text to be iterated over.
|
int |
hashCode()
Returns a hashcode for this object.
|
char |
last()
Set the position to getEndIndex() and return the character at that
position.
|
char |
next()
Increment the iterator's index by one and return the character
at the new index.
|
char |
previous()
Decrement the iterator's index by one and return the character
at the new index.
|
char |
setIndex(int p)
Set the position to specified position in the array of characters
and return that character.
|
protected Text text
protected char[] array
protected int begin
protected int end
protected int pos
public TextCharacterIterator(Text text)
text - the text object to be iterated over.public TextCharacterIterator(Text text, int pos)
text - the text object to be iterated over.pos - initial iterator position.public TextCharacterIterator(Text text, int begin, int end, int pos)
text - the text object to be iterated over.begin - index of the first character.end - index of the character following the last character.pos - initial iterator position.public TextCharacterIterator(char[] array)
array - the array of characters to be iterated over.public TextCharacterIterator(char[] array,
int pos)
array - the array of characters to be iterated over.pos - initial iterator position.public TextCharacterIterator(char[] array,
int begin,
int end,
int pos)
array - the array of characters to be iterated over.begin - index of the first character.end - index of the character following the last character.pos - initial iterator position.public final Text getText()
public final char first()
first インタフェース内 java.text.CharacterIteratorpublic final char last()
last インタフェース内 java.text.CharacterIteratorpublic final char setIndex(int p)
setIndex インタフェース内 java.text.CharacterIteratorp - the position.public final char current()
current インタフェース内 java.text.CharacterIteratorpublic final char next()
next インタフェース内 java.text.CharacterIteratorpublic final char previous()
previous インタフェース内 java.text.CharacterIteratorpublic final int getBeginIndex()
getBeginIndex インタフェース内 java.text.CharacterIteratorpublic final int getEndIndex()
getEndIndex インタフェース内 java.text.CharacterIteratorpublic final int getIndex()
getIndex インタフェース内 java.text.CharacterIteratorpublic int hashCode()
hashCode クラス内 java.lang.Objectpublic boolean equals(java.lang.Object anObject)
equals クラス内 java.lang.Objectpublic java.lang.Object clone()
clone インタフェース内 java.text.CharacterIteratorclone クラス内 java.lang.Object