com.davidsoergel.conja
Interface ThreadSafeNextOnlyIterator<T>
- All Known Implementing Classes:
- IntegerIterator, IteratorAsThreadSafeNextOnlyIterator, MappingThreadSafeNextOnlyIterator
public interface ThreadSafeNextOnlyIterator<T>
An iterator that lacks hasNext and remove. Particularly useful for concurrency, where keeping state required for
hasNext makes a mess
- Version:
- $Id$
- Author:
- David Soergel
|
Method Summary |
T |
next()
Returns the next object from the iterator. |
next
@NotNull
T next()
throws java.util.NoSuchElementException
- Returns the next object from the iterator. Must be thread-safe, i.e. multiple threads should be able to poll
simultaneously
- Throws:
java.util.NoSuchElementException
Copyright © 2006-2010 David Soergel. All Rights Reserved.