Package de.intarsys.tools.collection
Class SingleObjectEnumeration<T>
- java.lang.Object
-
- de.intarsys.tools.collection.SingleObjectEnumeration<T>
-
- All Implemented Interfaces:
java.util.Enumeration<T>
public class SingleObjectEnumeration<T> extends java.lang.Object implements java.util.Enumeration<T>
An enumeration of a single object.
-
-
Constructor Summary
Constructors Constructor Description SingleObjectEnumeration(T single)
EnumerationIterator constructor comment.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
hasMoreElements()
T
nextElement()
void
remove()
Removes from the underlying collection the last element returned by the iterator (optional operation).
-
-
-
Constructor Detail
-
SingleObjectEnumeration
public SingleObjectEnumeration(T single)
EnumerationIterator constructor comment.- Parameters:
single
-
-
-
Method Detail
-
hasMoreElements
public boolean hasMoreElements()
- Specified by:
hasMoreElements
in interfacejava.util.Enumeration<T>
-
remove
public void remove()
Removes from the underlying collection the last element returned by the iterator (optional operation). This method can be called only once per call to next. The behavior of an iterator is unspecified if the underlying collection is modified while the iteration is in progress in any way other than by calling this method.- Throws:
java.lang.UnsupportedOperationException
- if the remove operation is not supported by this Iterator.
-
-