Package de.intarsys.tools.collection
Class EmptyEnumeration
java.lang.Object
de.intarsys.tools.collection.EmptyEnumeration
- All Implemented Interfaces:
Enumeration
An Enumeration without elements.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
Return always false as an emtpy enumeration has no elements.Throw always exception, as an empty enumeration has no elements.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
-
Field Details
-
UNIQUE
-
-
Constructor Details
-
EmptyEnumeration
protected EmptyEnumeration()Create an emtpy enumeration
-
-
Method Details
-
hasMoreElements
public boolean hasMoreElements()Return always false as an emtpy enumeration has no elements.- Specified by:
hasMoreElements
in interfaceEnumeration
- Returns:
- Return always false as an emtpy enumeration has no elements.
-
nextElement
Throw always exception, as an empty enumeration has no elements.- Specified by:
nextElement
in interfaceEnumeration
- Returns:
- never
- Throws:
NoSuchElementException
- Is thrown always
-