public final class UnmodifiableCharListIterator extends ProxyCharListIterator
Modifier and Type | Field and Description |
---|---|
private CharListIterator |
proxied |
Constructor and Description |
---|
UnmodifiableCharListIterator(CharListIterator iterator) |
Modifier and Type | Method and Description |
---|---|
void |
add(char value)
Inserts the specified element into my underlying collection
(optional operation).
|
protected CharListIterator |
getListIterator() |
void |
remove()
Removes from my underlying collection the last
element returned by
CharListIterator.next() or CharListIterator.previous()
(optional operation). |
void |
set(char value)
Replaces in my underlying collection the last
element returned by
CharListIterator.next() or CharListIterator.previous()
with the specified value (optional operation). |
static CharListIterator |
wrap(CharListIterator iterator) |
getIterator, hasPrevious, nextIndex, previous, previousIndex
hasNext, next
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
hasNext, next
private CharListIterator proxied
UnmodifiableCharListIterator(CharListIterator iterator)
public void remove()
CharListIterator
CharListIterator.next()
or CharListIterator.previous()
(optional operation).public void add(char value)
CharListIterator
CharListIterator.next()
, if any,
and immediately after the next element that would have been
returned by CharListIterator.previous()
, if any.
The new element is inserted immediately before the implied
cursor. A subsequent call to CharListIterator.previous()
will return
the added element, a subsequent call to CharListIterator.next()
will
be unaffected. This call increases by one the value that
would be returned by a call to CharListIterator.nextIndex()
or
CharListIterator.previousIndex()
.value
- the value to be insertedpublic void set(char value)
CharListIterator
CharListIterator.next()
or CharListIterator.previous()
with the specified value (optional operation).value
- the value to replace the last returned element withprotected CharListIterator getListIterator()
getListIterator
in class ProxyCharListIterator
public static final CharListIterator wrap(CharListIterator iterator)
Copyright (c) 2002-2003 - Apache Software Foundation