info.aduna.collections.iterators
Class SingletonIterator<E>

java.lang.Object
  extended by info.aduna.iteration.CloseableIterationBase<E,X>
      extended by info.aduna.iteration.SingletonIteration<E,RuntimeException>
          extended by info.aduna.collections.iterators.SingletonIterator<E>
All Implemented Interfaces:
CloseableIterator<E>, CloseableIteration<E,RuntimeException>, Iteration<E,RuntimeException>, Closeable, Iterator<E>

public class SingletonIterator<E>
extends SingletonIteration<E,RuntimeException>
implements CloseableIterator<E>

An iterator that contains exactly one element.


Field Summary
 
Fields inherited from class info.aduna.iteration.CloseableIterationBase
logger
 
Constructor Summary
SingletonIterator(E value)
          Creates a new EmptyIterator.
 
Method Summary
 
Methods inherited from class info.aduna.iteration.SingletonIteration
handleClose, hasNext, next, remove
 
Methods inherited from class info.aduna.iteration.CloseableIterationBase
close, isClosed
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface info.aduna.collections.iterators.CloseableIterator
close
 
Methods inherited from interface java.util.Iterator
hasNext, next, remove
 

Constructor Detail

SingletonIterator

public SingletonIterator(E value)
Creates a new EmptyIterator.



Copyright © 1997-2008 Aduna. All Rights Reserved.