org.apache.commons.collections.bidimap

Class DualTreeBidiMap.BidiOrderedMapIterator

Enclosing Class:
DualTreeBidiMap
Implemented Interfaces:
Iterator, MapIterator, OrderedIterator, OrderedMapIterator, ResettableIterator

protected static class DualTreeBidiMap.BidiOrderedMapIterator
extends java.lang.Object
implements OrderedMapIterator, ResettableIterator

Inner class MapIterator.

Field Summary

protected ListIterator
iterator
The iterator being decorated
protected AbstractDualBidiMap
parent
The parent map

Constructor Summary

BidiOrderedMapIterator(AbstractDualBidiMap parent)
Constructor.

Method Summary

Object
getKey()
Object
getValue()
boolean
hasNext()
boolean
hasPrevious()
Checks to see if there is a previous entry that can be iterated to.
Object
next()
Object
previous()
Gets the previous key from the Map.
void
remove()
void
reset()
Object
setValue(Object value)
String
toString()

Field Details

iterator

protected ListIterator iterator
The iterator being decorated

parent

protected final AbstractDualBidiMap parent
The parent map

Constructor Details

BidiOrderedMapIterator

protected BidiOrderedMapIterator(AbstractDualBidiMap parent)
Constructor.
Parameters:
parent - the parent map

Method Details

getKey

public Object getKey()
Specified by:
getKey in interface MapIterator

getValue

public Object getValue()
Specified by:
getValue in interface MapIterator

hasNext

public boolean hasNext()
Specified by:
hasNext in interface MapIterator

hasPrevious

public boolean hasPrevious()
Checks to see if there is a previous entry that can be iterated to.
Specified by:
hasPrevious in interface OrderedMapIterator
hasPrevious in interface OrderedIterator
Returns:
true if the iterator has a previous element

next

public Object next()
Specified by:
next in interface MapIterator

previous

public Object previous()
Gets the previous key from the Map.
Specified by:
previous in interface OrderedMapIterator
previous in interface OrderedIterator
Returns:
the previous key in the iteration

remove

public void remove()
Specified by:
remove in interface MapIterator

reset

public void reset()
Specified by:
reset in interface ResettableIterator

setValue

public Object setValue(Object value)
Specified by:
setValue in interface MapIterator

toString

public String toString()

Copyright © 2001-2006 Apache Software Foundation. All Rights Reserved.