org.apache.commons.collections.primitives.adapters

Class ListIteratorCharListIterator

public class ListIteratorCharListIterator extends Object implements CharListIterator

Adapts a Number-valued ListIterator ListIterator to the CharListIterator interface.

This implementation delegates most methods to the provided CharListIterator implementation in the "obvious" way.

Since: Commons Primitives 1.0

Version: $Revision: 1.3 $ $Date: 2003/10/16 20:49:39 $

Author: Rodney Waldhoff

Field Summary
ListIterator_iterator
Constructor Summary
ListIteratorCharListIterator(ListIterator iterator)
Creates an CharListIterator wrapping the specified ListIterator ListIterator.
Method Summary
voidadd(char element)
booleanhasNext()
booleanhasPrevious()
charnext()
intnextIndex()
charprevious()
intpreviousIndex()
voidremove()
voidset(char element)
static CharListIteratorwrap(ListIterator iterator)
Create an CharListIterator wrapping the specified ListIterator ListIterator.

Field Detail

_iterator

private ListIterator _iterator

Constructor Detail

ListIteratorCharListIterator

public ListIteratorCharListIterator(ListIterator iterator)
Creates an CharListIterator wrapping the specified ListIterator ListIterator.

See Also: ListIteratorCharListIterator

Method Detail

add

public void add(char element)

hasNext

public boolean hasNext()

hasPrevious

public boolean hasPrevious()

next

public char next()

nextIndex

public int nextIndex()

previous

public char previous()

previousIndex

public int previousIndex()

remove

public void remove()

set

public void set(char element)

wrap

public static CharListIterator wrap(ListIterator iterator)
Create an CharListIterator wrapping the specified ListIterator ListIterator. When the given iterator is null, returns null.

Parameters: iterator the (possibly null) ListIterator ListIterator to wrap

Returns: an CharListIterator wrapping the given iterator, or null when iterator is null.

Copyright (c) 2002-2003 - Apache Software Foundation