@Override
    public boolean evaluate() throws ScriptRuntimeException {
        Object leftObject = left.evaluate();
        Object rightObject = right.evaluate();
        
        if (leftObject instanceof Integer && rightObject instanceof Integer) {
            int leftValue = ((Integer) leftObject).intValue();
            int rightValue = ((Integer) rightObject).intValue();
            
            switch (operation) {
                case EQUAL:
                    return leftValue == rightValue;
                case GREATER:
                    return leftValue > rightValue;
                case LESS:
                    return leftValue < rightValue;
                case GREATER_OR_EQUAL:
                    return leftValue >= rightValue;
                case LESS_OR_EQUAL:
                    return leftValue <= rightValue;
                case NOT_EQUAL:
                    return leftValue != rightValue;
                default:
                    return false;
            }
            
        } else
            throw new ScriptRuntimeException("Cannot compare non-integer values");
    }