Class StringCharacterIterator
java.lang.Object
java.text.StringCharacterIterator
- All Implemented Interfaces:
Cloneable
,CharacterIterator
StringCharacterIterator
implements the
CharacterIterator
protocol for a String
.
The StringCharacterIterator
class iterates over the
entire String
. All constructors throw NullPointerException
if text
is null
.- Since:
- 1.1
- See Also:
-
Field Summary
Fields declared in interface java.text.CharacterIterator
DONE
-
Constructor Summary
ConstructorsConstructorDescriptionConstructs an iterator with an initial index of 0.StringCharacterIterator
(String text, int pos) Constructs an iterator with the specified initial index.StringCharacterIterator
(String text, int begin, int end, int pos) Constructs an iterator over the given range of the given string, with the index set at the specified position. -
Method Summary
Modifier and TypeMethodDescriptionclone()
Creates a copy of this iterator.char
current()
Implements CharacterIterator.current() for String.boolean
Compares the equality of two StringCharacterIterator objects.char
first()
Implements CharacterIterator.first() for String.int
Implements CharacterIterator.getBeginIndex() for String.int
Implements CharacterIterator.getEndIndex() for String.int
getIndex()
Implements CharacterIterator.getIndex() for String.int
hashCode()
Computes a hashcode for this iterator.char
last()
Implements CharacterIterator.last() for String.char
next()
Implements CharacterIterator.next() for String.char
previous()
Implements CharacterIterator.previous() for String.char
setIndex
(int p) Implements CharacterIterator.setIndex() for String.void
Reset this iterator to point to a new string.
-
Constructor Details
-
StringCharacterIterator
public StringCharacterIterator(
-