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.Enumeration
An Enumeration without elements.
-
-
Field Summary
Fields Modifier and Type Field Description static java.util.Enumeration
UNIQUE
-
Constructor Summary
Constructors Modifier Constructor Description protected
EmptyEnumeration()
Create an emtpy enumeration
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
hasMoreElements()
Return always false as an emtpy enumeration has no elements.java.lang.Object
nextElement()
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:
hasMoreElements
in 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:
nextElement
in interfacejava.util.Enumeration
- Returns:
- never
- Throws:
java.util.NoSuchElementException
- Is thrown always
-
-