intarsys runtime library

de.intarsys.tools.collection
Class EmptyEnumeration

java.lang.Object
  extended by de.intarsys.tools.collection.EmptyEnumeration
All Implemented Interfaces:
Enumeration

public class EmptyEnumeration
extends Object
implements Enumeration

An Enumeration without elements.


Field Summary
static Enumeration UNIQUE
           
 
Method Summary
 boolean hasMoreElements()
          Return always false as an emtpy enumeration has no elements.
 Object nextElement()
          Throw always exception, as an empty enumeration has no elements.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

UNIQUE

public static final Enumeration UNIQUE
Method Detail

hasMoreElements

public boolean hasMoreElements()
Return always false as an emtpy enumeration has no elements.

Specified by:
hasMoreElements in interface Enumeration
Returns:
Return always false as an emtpy enumeration has no elements.

nextElement

public Object nextElement()
Throw always exception, as an empty enumeration has no elements.

Specified by:
nextElement in interface Enumeration
Returns:
never
Throws:
NoSuchElementException - Is thrown always

intarsys runtime library

Copyright © 2008 intarsys consulting GmbH. All Rights Reserved.