com.enspire.gemini.bidirectional
Class BidirectionalIterator
java.lang.Object
com.enspire.gemini.bidirectional.BidirectionalIterator
- All Implemented Interfaces:
- java.util.Iterator
public class BidirectionalIterator
- extends java.lang.Object
- implements java.util.Iterator
e-nspire site
Decorator around another Iterator
. Ensures bidirectional
behaviour over iterated elements.
- Since:
- 1.0
- Author:
- Dragan Djuric
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BidirectionalIterator
public BidirectionalIterator(BidirectionalProperty bidirectionalProperty,
java.util.Iterator iterator)
- Constructor that decorates the specified iterator.
- Parameters:
bidirectionalProperty
- the source of the decorated iteratoriterator
- the iterator to decorate, must not be null
- Throws:
java.lang.IllegalArgumentException
- if the collection is null
getDecorated
public java.util.Iterator getDecorated()
- Returns:
- Returns the decorated.
getBidirectionalProperty
public BidirectionalProperty getBidirectionalProperty()
- Returns:
- Returns the bidirectionalProperty.
getLast
public java.lang.Object getLast()
- Returns:
- Returns the last.
hasNext
public boolean hasNext()
- Specified by:
hasNext
in interface java.util.Iterator
- See Also:
Iterator.hasNext()
next
public java.lang.Object next()
- Specified by:
next
in interface java.util.Iterator
- See Also:
Iterator.next()
remove
public void remove()
- Removes the current element and updates the opposite property.
- Specified by:
remove
in interface java.util.Iterator
- See Also:
Iterator.remove()
Copyright © 2005 e-nspire. All Rights Reserved.