EmptyEnumeration.java

key0-96/src/util/EmptyEnumeration.java · 989 B

From the archive key0-96.tar.bz2

Download the archive   « Back to the archive contents

/*
**               j###t  ########## ####   ####
**              j###t   ########## ####   ####
**             j###T               "###L J###"
**          ######P'    ##########  #########
**          ######k,    ##########   T######T
**          ####~###L   ####
**          #### q###L  ##########   .#####
**          ####  \###L ##########   #####"
**
**  $Id$
**
**  Class History
**
**  Date        Name         Description
**  ---------|------------|-----------------------------------------------
**  19Aug98     subtle       start of recorded history
**
*/

package key.util;

import java.util.Enumeration;
import java.util.NoSuchElementException;

public class EmptyEnumeration implements Enumeration
{
	public static final EmptyEnumeration EMPTY = new EmptyEnumeration();
	
	public EmptyEnumeration()
	{
	}

	public boolean hasMoreElements()
	{
		return( false );
	}

	public Object nextElement()
	{
		throw new NoSuchElementException( "iterating in empty enumeration" );
	}
}

Site Stats

Snippets: 1791
Codebases: 571