org.databene.commons.iterator
Class ReverseIterator<E>

java.lang.Object
  extended by org.databene.commons.iterator.IteratorProxy<E>
      extended by org.databene.commons.iterator.ReverseIterator<E>
All Implemented Interfaces:
java.util.Iterator<E>, BidirectionalIterator<E>

public class ReverseIterator<E>
extends IteratorProxy<E>

Iterates through a BidirectionalIterator in reverse order.

Created: 12.05.2007 23:18:08

Author:
Volker Bergmann

Constructor Summary
ReverseIterator(BidirectionalIterator<E> realIterator)
           
 
Method Summary
 E first()
           
 boolean hasNext()
           
 boolean hasPrevious()
           
 E last()
           
 E next()
           
 E previous()
           
 
Methods inherited from class org.databene.commons.iterator.IteratorProxy
remove
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReverseIterator

public ReverseIterator(BidirectionalIterator<E> realIterator)
Method Detail

first

public E first()
Specified by:
first in interface BidirectionalIterator<E>
Overrides:
first in class IteratorProxy<E>

hasPrevious

public boolean hasPrevious()
Specified by:
hasPrevious in interface BidirectionalIterator<E>
Overrides:
hasPrevious in class IteratorProxy<E>

previous

public E previous()
Specified by:
previous in interface BidirectionalIterator<E>
Overrides:
previous in class IteratorProxy<E>

last

public E last()
Specified by:
last in interface BidirectionalIterator<E>
Overrides:
last in class IteratorProxy<E>

hasNext

public boolean hasNext()
Specified by:
hasNext in interface java.util.Iterator<E>
Overrides:
hasNext in class IteratorProxy<E>

next

public E next()
Specified by:
next in interface java.util.Iterator<E>
Overrides:
next in class IteratorProxy<E>


Copyright © 2010. All Rights Reserved.