org.apache.commons.collections.primitives.adapters

Class ListIteratorShortListIterator

public class ListIteratorShortListIterator extends Object implements ShortListIterator

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

This implementation delegates most methods to the provided ShortListIterator 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
ListIteratorShortListIterator(ListIterator iterator)
Creates an ShortListIterator wrapping the specified ListIterator ListIterator.
Method Summary
voidadd(short element)
booleanhasNext()
booleanhasPrevious()
shortnext()
intnextIndex()
shortprevious()
intpreviousIndex()
voidremove()
voidset(short element)
static ShortListIteratorwrap(ListIterator iterator)
Create an ShortListIterator wrapping the specified ListIterator ListIterator.

Field Detail

_iterator

private ListIterator _iterator

Constructor Detail

ListIteratorShortListIterator

public ListIteratorShortListIterator(ListIterator iterator)
Creates an ShortListIterator wrapping the specified ListIterator ListIterator.

See Also: ListIteratorShortListIterator

Method Detail

add

public void add(short element)

hasNext

public boolean hasNext()

hasPrevious

public boolean hasPrevious()

next

public short next()

nextIndex

public int nextIndex()

previous

public short previous()

previousIndex

public int previousIndex()

remove

public void remove()

set

public void set(short element)

wrap

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

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

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

Copyright (c) 2002-2003 - Apache Software Foundation