@Override
    public boolean equals(Object obj) {
        if (obj instanceof Operator) {
            Operator o = (Operator) obj;
            return symbol.equals(o.symbol) && priority == o.priority && associativity == o.associativity;
        }
        return false;
    }