org.exolab.jms.tools.migration
Class IteratorAdapter

java.lang.Object
  |
  +--org.exolab.jms.tools.migration.IteratorAdapter
All Implemented Interfaces:
StoreIterator

public class IteratorAdapter
extends java.lang.Object
implements StoreIterator

Helper to adapt an Iterator to a StoreIterator.

Version:
$Revision: 1.1 $ $Date: 2005/10/20 14:07:02 $
Author:
Tim Anderson

Constructor Summary
IteratorAdapter(java.util.Iterator iterator)
          Construct a new IteratorAdapter.
 
Method Summary
 boolean hasNext()
          Returns true if the iterator has more elements.
 java.lang.Object next()
          Returns the next element in the interation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IteratorAdapter

public IteratorAdapter(java.util.Iterator iterator)
Construct a new IteratorAdapter.
Parameters:
iterator - the iterator to adapt
Method Detail

hasNext

public boolean hasNext()
Returns true if the iterator has more elements.
Specified by:
hasNext in interface StoreIterator
Returns:
true if the iterator has more elements.

next

public java.lang.Object next()
Returns the next element in the interation.
Specified by:
next in interface StoreIterator
Returns:
the next element in the iteration.
Throws:
java.util.NoSuchElementException - iteration has no more elements.


Copyright © 1999-2007 The OpenJMS Group. All Rights Reserved.