Package org.codehaus.stax2.ri
Class SingletonIterator<T>
- java.lang.Object
-
- org.codehaus.stax2.ri.SingletonIterator<T>
-
- All Implemented Interfaces:
java.util.Iterator<T>
public class SingletonIterator<T> extends java.lang.Object implements java.util.Iterator<T>
Simple read-only iterator that iterators over one specific item, passed in as constructor argument.
-
-
Constructor Summary
Constructors Constructor Description SingletonIterator(T value)
Deprecated.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static <T> SingletonIterator<T>
create(T value)
boolean
hasNext()
T
next()
void
remove()
-
-
-
Field Detail
-
_value
private final T _value
-
_done
private boolean _done
-
-
Constructor Detail
-
SingletonIterator
@Deprecated public SingletonIterator(T value)
Deprecated.
-
-
Method Detail
-
create
public static <T> SingletonIterator<T> create(T value)
-
hasNext
public boolean hasNext()
- Specified by:
hasNext
in interfacejava.util.Iterator<T>
-
remove
public void remove()
- Specified by:
remove
in interfacejava.util.Iterator<T>
-
-