ArrayEnumeration.java

key0-96/src/util/ArrayEnumeration.java · 952 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 ArrayEnumeration implements Enumeration
{
	Object[] objects;
	int c;
	
	public ArrayEnumeration( Object[] os )
	{
		objects = os;
		c = 0;
	}

	public boolean hasMoreElements()
	{
		return( c < objects.length );
	}

	public Object nextElement()
	{
		return( objects[ c++ ] );
	}
}

Site Stats

Snippets: 1791
Codebases: 571