Package de.intarsys.tools.collection
Class EmptyEnumeration
- java.lang.Object
-
- de.intarsys.tools.collection.EmptyEnumeration
-
- All Implemented Interfaces:
java.util.Enumeration
public class EmptyEnumeration extends java.lang.Object implements java.util.EnumerationAn Enumeration without elements.
-
-
Field Summary
Fields Modifier and Type Field Description static java.util.EnumerationUNIQUE
-
Constructor Summary
Constructors Modifier Constructor Description protectedEmptyEnumeration()Create an emtpy enumeration
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanhasMoreElements()Return always false as an emtpy enumeration has no elements.java.lang.ObjectnextElement()Throw always exception, as an empty enumeration has no elements.
-
-
-
Method Detail
-
hasMoreElements
public boolean hasMoreElements()
Return always false as an emtpy enumeration has no elements.- Specified by:
hasMoreElementsin interfacejava.util.Enumeration- Returns:
- Return always false as an emtpy enumeration has no elements.
-
nextElement
public java.lang.Object nextElement()
Throw always exception, as an empty enumeration has no elements.- Specified by:
nextElementin interfacejava.util.Enumeration- Returns:
- never
- Throws:
java.util.NoSuchElementException- Is thrown always
-
-