// Decompiled by Jad v1.5.8e. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.geocities.com/kpdus/jad.html
// Decompiler options: packimports(3) space 
// Source File Name:   SimpleEnvironment.java

package lt.monarch.function;

import java.util.Hashtable;

// Referenced classes of package lt.monarch.function:
//            Environment, Identifier, Constant, StdFunction

public class SimpleEnvironment
    implements Environment
{

    public Identifier identifierWithName(String s)
    {
        return (Identifier)identifiers.get(s);
    }

    public void addIdentifier(Identifier identifier)
    {
        identifiers.put(identifier.name(), identifier);
    }

    public SimpleEnvironment()
    {
        identifiers = new Hashtable();
        addIdentifier(new Constant("pi", 3.1415926535897931D));
        addIdentifier(new Constant("e", 2.7182818284590451D));
        addIdentifier(new StdFunction(1));
        addIdentifier(new StdFunction(2));
        addIdentifier(new StdFunction(3));
        addIdentifier(new StdFunction(4));
    }

    private Hashtable identifiers;
}
