package ast.node;

import ast.visitor.Visitor;

@SuppressWarnings("nls")
public final class IntegerExp extends IExp
{
    private int value;

    public IntegerExp()
    {
        // Constructor
    }

    public IntegerExp(int value)
    {
        // Constructor
        setValue(value);
    }

    @Override
    public Object clone()
    {
        return new IntegerExp(this.value);
    }

    public void accept(Visitor v)
    {
        v.visitIntegerExp(this);
    }

    public int getValue()
    {
        return this.value;
    }

    public void setValue(int value)
    {
        this.value = value;
    }

    @Override
    void removeChild(Node child)
    {
        throw new RuntimeException("Not a child.");
    }

    @Override
    void replaceChild(Node oldChild, Node newChild)
    {
        throw new RuntimeException("Not a child.");
    }
}
