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 TypeMethodDescriptionbooleanReturn 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, waitMethods 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:
hasMoreElementsin 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:
nextElementin interfaceEnumeration- Returns:
- never
- Throws:
NoSuchElementException- Is thrown always
-