|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.xshare.base.iterator.ReverseIterator
Iterator which returns the elements of a given iterator in reverse order.
remove()
method is not supported.
next()
it is removed from the cache.
Constructor Summary | |
ReverseIterator(java.util.Iterator pSourceIterator)
Creates a new instance for a given iteration. |
|
ReverseIterator(java.util.List pSourceList)
Deprecated. If you need a reversing iterator for a List , then use the
ListReverseIterator instead. This constructor
will be removed with version 1. |
Method Summary | |
boolean |
hasNext()
Checks if there are elements to return left. |
java.lang.Object |
next()
Returns the next element of the iteration. |
void |
remove()
This operation is not supported by this iterator, since it works on an internal copy of the original iteration. |
protected void |
setUsedIterator(java.util.Iterator pIterator)
Deprecated. Don't used it. Will be removed with version 1. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ReverseIterator(java.util.Iterator pSourceIterator)
Hint: This iterator copies all elements of the source iterator into a private collection instance and operates on this collection instead on the original iteration. This can increase you memory consumption if you create an instance of a huge iteration.
pSourceIterator
- an Iterator
valuepublic ReverseIterator(java.util.List pSourceList)
List
, then use the
ListReverseIterator
instead. This constructor
will be removed with version 1.
Method Detail |
public void remove()
remove
in interface java.util.Iterator
public java.lang.Object next()
next
in interface java.util.Iterator
Object
object, representing
the next object to return.public boolean hasNext()
hasNext
in interface java.util.Iterator
boolean
value which is true
if there are more elements. Otherwiese false
is returned.
protected void setUsedIterator(java.util.Iterator pIterator)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |