StringCharacterIterator (Java SE 26 & JDK 26)
- All Implemented Interfaces:
Cloneable, CharacterIterator
-
Field Summary
Fields declared in interface CharacterIterator
static final charConstant that is returned when the iterator has reached either the end or the beginning of the text.
-
Constructor Summary
Constructors
Constructs an iterator with an initial index of 0.
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
clone()Creates a copy of this iterator.
charcurrent()Implements CharacterIterator.current() for String.
booleanCompares the equality of two StringCharacterIterator objects.
charfirst()Implements CharacterIterator.first() for String.
intImplements CharacterIterator.getBeginIndex() for String.
intImplements CharacterIterator.getEndIndex() for String.
intgetIndex()Implements CharacterIterator.getIndex() for String.
inthashCode()Computes a hashcode for this iterator.
charlast()Implements CharacterIterator.last() for String.
charnext()Implements CharacterIterator.next() for String.
charprevious()Implements CharacterIterator.previous() for String.
charsetIndex(int p) Implements CharacterIterator.setIndex() for String.
voidReset this iterator to point to a new string.
Methods declared in class Object
finalize, getClass, notify, notifyAll, toString, wait, wait, waitprotected voidDeprecated, for removal: This API element is subject to removal in a future version.
Returns the runtime class of this
Object.final voidWakes up a single thread that is waiting on this object's monitor.
final voidWakes up all threads that are waiting on this object's monitor.
Returns a string representation of the object.
final voidCauses the current thread to wait until it is awakened, typically by being notified or interrupted.
final voidwait(long timeoutMillis) Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.
final voidwait(long timeoutMillis, int nanos) Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.
-
Constructor Details
-
StringCharacterIterator
-
StringCharacterIterator
-
StringCharacterIterator
-
-
Method Details
-
setText
-
first
-
last
-
setIndex
-
current
-
next
-
previous
-
getBeginIndex
-
getEndIndex
-
getIndex
-
equals
-
hashCode
-
clone
-