public static int getType(ButtonType id) {
        switch (id) {
            case EQUALS:
                return 0;
            case PLUS:
            case MINUS:
            case TIMES:
            case MOD:
                return 1;
            case CLEAR:
                return 2;
            default:
                return 3;
        }
    }