Package de.intarsys.tools.collection
Class SingleObjectEnumeration<T>
java.lang.Object
de.intarsys.tools.collection.SingleObjectEnumeration<T>
- All Implemented Interfaces:
Enumeration<T>
An enumeration of a single object.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
void
remove()
Removes from the underlying collection the last element returned by the iterator (optional operation).Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.Enumeration
asIterator
-
Constructor Details
-
SingleObjectEnumeration
EnumerationIterator constructor comment.- Parameters:
single
-
-
-
Method Details
-
hasMoreElements
public boolean hasMoreElements()- Specified by:
hasMoreElements
in interfaceEnumeration<T>
-
nextElement
- Specified by:
nextElement
in interfaceEnumeration<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:
UnsupportedOperationException
- if the remove operation is not supported by this Iterator.
-