package fanch.multijeu.numbers.data;

public class ParentheseExpr extends Expression {
    protected char mChar;

    protected ParentheseExpr(char c)
    {
        super();
        mChar=c;
    }

    @Override
    public String toString() {
        return ""+mChar;
    }

    @Override
    public int compute() {
        return 0;
    }

    public boolean isOpen()
    {
        return mChar=='(';
    }

    @Override
    public Expression simplify() {
        return null;
    }

    @Override
    public Expression clone() {
        return new ParentheseExpr(mChar);
    }

    @Override
    public int opCount() {
        return 0;
    }

    public static ParentheseExpr open()
    {
        return new ParentheseExpr('(');
    }

    public static ParentheseExpr close()
    {
        return new ParentheseExpr(')');
    }
}
