|
PCJ API Version 1.2 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object bak.pcj.adapter.CharListIteratorToListIteratorAdapter
This class represents adaptions of primitive list iterators over char values to Java Collections Framework list iterators.
Field Summary | |
protected CharListIterator |
iterator
The underlying primitive iterator. |
Constructor Summary | |
CharListIteratorToListIteratorAdapter(CharListIterator iterator)
Creates a new adaption of a primitive list iterator over char values to a Java Collections Framework list iterator. |
Method Summary | |
void |
add(Object o)
Adds a specified element to the list at this iterator's current position. |
boolean |
hasNext()
Indicates whether more values can be returned by this iterator. |
boolean |
hasPrevious()
Indicates whether more values can be returned by this iterator by calling previous(). |
Object |
next()
Returns the next value of this iterator. |
int |
nextIndex()
Returns the index of the element that would be returned by a call to next(). |
Object |
previous()
Returns the previous value of this iterator. |
int |
previousIndex()
Returns the index of the element that would be returned by a call to previous(). |
void |
remove()
Removes the last value returned from the underlying collection. |
void |
set(Object o)
Sets the last element returned to a specified value. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected CharListIterator iterator
Constructor Detail |
public CharListIteratorToListIteratorAdapter(CharListIterator iterator)
iterator
- the primitive iterator to adapt.
NullPointerException
- if iterator is null.Method Detail |
public void add(Object o)
add
in interface ListIterator
o
- the element to add.
UnsupportedOperationException
- if addition is not supported by this
iterator.
ClassCastException
- if o is not of class
Character
.
NullPointerException
- if o is null.public boolean hasNext()
hasNext
in interface ListIterator
next()
public boolean hasPrevious()
hasPrevious
in interface ListIterator
previous()
public Object next()
next
in interface ListIterator
NoSuchElementException
- if no more elements are available from this
iterator.hasNext()
public int nextIndex()
nextIndex
in interface ListIterator
next()
public Object previous()
previous
in interface ListIterator
NoSuchElementException
- if no more elements are available from this
iterator in backwards direction.hasPrevious()
public int previousIndex()
previousIndex
in interface ListIterator
previous()
public void remove()
remove
in interface ListIterator
UnsupportedOperationException
- if removal is not supported by this iterator.
IllegalStateException
- if no element has been returned by this iterator
yet.public void set(Object o)
set
in interface ListIterator
o
- the new value of the element.
UnsupportedOperationException
- if replacement is not supported by this iterator.
IllegalStateException
- if no element has been returned by this iterator
yet.
ClassCastException
- if o is not of class
Character
.
NullPointerException
- if o is null.
|
PCJ API Version 1.2 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |