@Generated(value="Autogenerated by OpenJAX CodeGen Template (0.2.5)", date="2020-05-23") public interface CharListIterator extends CharIterator
ListIterator
interface that defines
synonymous methods for the iteration over char
values instead of
Object references.Modifier and Type | Method and Description |
---|---|
void |
add(char value)
Inserts the specified value into the list (optional operation).
|
boolean |
hasNext()
Returns
true if this list iterator has more values when
traversing the list in the forward direction. |
boolean |
hasPrevious()
Returns
true if this list iterator has more values when
traversing the list in the reverse direction. |
char |
next()
Returns the next value in the list and advances the cursor position.
|
int |
nextIndex()
Returns the index of the value that would be returned by a
subsequent call to
next() . |
char |
previous()
Returns the previous value in the list and moves the cursor
position backwards.
|
int |
previousIndex()
Returns the index of the value that would be returned by a
subsequent call to
previous() . |
void |
remove()
Removes from the list the last value that was returned by
next() or previous() (optional operation). |
void |
set(char value)
Replaces the last value returned by
next() or
previous() with the specified value (optional operation). |
forEachRemaining
boolean hasNext()
true
if this list iterator has more values when
traversing the list in the forward direction. (In other words,
returns true
if next()
would return an value rather
than throwing an exception.)hasNext
in interface CharIterator
true
if the list iterator has more values when
traversing the list in the forward direction.char next()
previous()
to go back and forth.
(Note that alternating calls to next
and previous
will return the same value repeatedly.)next
in interface CharIterator
NoSuchElementException
- If the iteration has no next value.boolean hasPrevious()
true
if this list iterator has more values when
traversing the list in the reverse direction. (In other words,
returns true
if previous()
would return an value
rather than throwing an exception.)true
if the list iterator has more values when
traversing the list in the reverse direction.char previous()
next()
to go back and forth. (Note that alternating calls
to next
and previous
will return the same
value repeatedly.)NoSuchElementException
- If the iteration has no previous
value.int nextIndex()
next()
. (Returns list size if the list
iterator is at the end of the list.)next
, or list size if the list
iterator is at the end of the list.int previousIndex()
previous()
. (Returns -1 if the list
iterator is at the beginning of the list.)previous
, or -1 if the list
iterator is at the beginning of the list.void remove()
next()
or previous()
(optional operation). This call can
only be made once per call to next
or previous
.
It can be made only if add(char)
has not been
called after the last call to next
or previous
.remove
in interface CharIterator
UnsupportedOperationException
- If the remove
operation is not supported by this list iterator.IllegalStateException
- If neither next
nor
previous
have been called, or remove
or
add
have been called after the last call to
next
or previous
.void set(char value)
next()
or
previous()
with the specified value (optional operation).
This call can be made only if neither remove()
nor add(char)
have been called after the last call to next
or
previous
.value
- The value with which to replace the last value returned by
next
or previous
.UnsupportedOperationException
- If the set
operation
is not supported by this list iterator.IllegalArgumentException
- If some aspect of the specified
value prevents it from being added to this list.IllegalStateException
- If neither next
nor
previous
have been called, or remove
or
add
have been called after the last call to
next
or previous
.void add(char value)
next()
, if any, and after the value
that would be returned by previous()
, if any. (If the
list contains no values, the new value becomes the sole value
on the list.) The new value is inserted before the implicit
cursor: a subsequent call to next
would be unaffected, and a
subsequent call to previous
would return the new value.
(This call increases by one the value that would be returned by a
call to nextIndex
or previousIndex
.)value
- The value to insert.UnsupportedOperationException
- If the add
method is
not supported by this list iterator.IllegalArgumentException
- If some aspect of this value
prevents it from being added to this list.Copyright © 2020 LibJ. All rights reserved.