org.apache.commons.collections.primitives.adapters

Class ShortListIteratorListIterator

public class ShortListIteratorListIterator extends Object implements ListIterator

Adapts an ShortListIterator to the ListIterator ListIterator interface.

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

Since: Commons Collections 2.2

Version: $Revision: 1.1 $ $Date: 2003/10/13 22:46:48 $

Author: Rodney Waldhoff

Field Summary
ShortListIterator_iterator
Constructor Summary
ShortListIteratorListIterator(ShortListIterator iterator)
Creates an ListIterator ListIterator wrapping the specified ShortListIterator.
Method Summary
voidadd(Object obj)
booleanhasNext()
booleanhasPrevious()
Objectnext()
intnextIndex()
Objectprevious()
intpreviousIndex()
voidremove()
voidset(Object obj)
static ListIteratorwrap(ShortListIterator iterator)
Create a ListIterator ListIterator wrapping the specified ShortListIterator.

Field Detail

_iterator

private ShortListIterator _iterator

Constructor Detail

ShortListIteratorListIterator

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

See Also: ShortListIteratorListIterator

Method Detail

add

public void add(Object obj)

hasNext

public boolean hasNext()

hasPrevious

public boolean hasPrevious()

next

public Object next()

nextIndex

public int nextIndex()

previous

public Object previous()

previousIndex

public int previousIndex()

remove

public void remove()

set

public void set(Object obj)

wrap

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

Parameters: iterator the (possibly null) ShortListIterator to wrap

Returns: a ListIterator ListIterator wrapping the given iterator, or null when iterator is null.

Copyright (c) 2002-2003 - Apache Software Foundation