// Copyright (c) 1996-2002 Brian D. Carlstrom

package bdc.scheme.procedure;

import bdc.scheme.Scheme;
import bdc.scheme.SchemeException;
import bdc.scheme.Stack;
import bdc.scheme.expression.Procedure1;
import bdc.util.Constants;
import java.util.Enumeration;

/**
    Primitive for Hashtable.hasMoreElements
*/
public class HasMoreElements extends Procedure1
{
    public Object apply1 (Stack stack) throws SchemeException
    {
        Object o1 = stack.array[stack.inUse-1];
        Enumeration e = Scheme.enumeration(o1, this);
        return Constants.getBoolean(e.hasMoreElements());
    }
}
