@NonNull
    public static Expression negated(@NonNull Expression expression) {
        if (expression == null) {
            throw new IllegalArgumentException("expression cannot be null.");
        }
        return new CompoundExpression(Arrays.asList(expression), CompoundExpression.OpType.Not);
    }
@ NonNull public static Expression negated ( @ NonNull Expression expression ) { if ( expression == null ) { throw new IllegalArgumentException ( "expression cannot be null." ) ; } return new CompoundExpression ( Arrays . asList ( expression ) , CompoundExpression . OpType . Not ) ; }
Create a negated expression to represent the negated result of the given expression.

@param expression the expression to be negated.
@return a negated expression.