org.hibernate.validator.util
Class IteratorEnumeration<T>
java.lang.Object
org.hibernate.validator.util.IteratorEnumeration<T>
- Type Parameters:
T - The enumerated type.
- All Implemented Interfaces:
- Enumeration<T>
public class IteratorEnumeration<T>
- extends Object
- implements Enumeration<T>
An Enumeration implementation, that wraps an Iterator. Can
be used to integrate older APIs working with enumerations with iterators.
- Author:
- Gunnar Morling
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
IteratorEnumeration
public IteratorEnumeration(Iterator<T> source)
- Creates a new IterationEnumeration.
- Parameters:
source - The source iterator. Must not be null.
hasMoreElements
public boolean hasMoreElements()
- Specified by:
hasMoreElements in interface Enumeration<T>
nextElement
public T nextElement()
- Specified by:
nextElement in interface Enumeration<T>
Copyright © 2011 Oracle Corporation. All Rights Reserved.