Returns true if a List literal that contains only entries that are constants.
@param expression - any expression
19464
public static boolean isListLiteralWithOnlyConstantValues(Expression expression) {
        if (expression instanceof ListExpression) {
            List<Expression> expressions = ((ListExpression) expression).getExpressions();
            for (Expression e : expressions) {
                if (!isConstantOrConstantLiteral(e)) {
                    return false;
                }
            }
            return true;
        }
        return false;
    }
419234
public static void isTrue(Boolean expression) {
		if(!validation) return;
		notNull(expression);
		if(!expression)
			throw new ParameterException(ErrorCode.CONSTRAINT);
	}
1124932
public static boolean isMapLiteralWithOnlyConstantValues(Expression expression) {
        if (expression instanceof MapExpression) {
            List<MapEntryExpression> entries = ((MapExpression) expression).getMapEntryExpressions();
            for (MapEntryExpression entry : entries) {
                if (!isConstantOrConstantLiteral(entry.getKeyExpression()) ||
                    !isConstantOrConstantLiteral(entry.getValueExpression())) {
                    return false;
                }
            }
            return true;
        }
        return false;
    }
1104803
def contains_variables_from_set(expression, variables):
    """"""
    if hasattr(expression, 'variable_name') and expression.variable_name in variables:
        return True
    if isinstance(expression, Operation):
        return any(contains_variables_from_set(o, variables) for o in op_iter(expression))
    return False
1298669
public boolean isIndexed(String expression) {
    if (expression == null || expression.length() == 0) { return false; }
    for (int i = 0; i < expression.length(); i++) {
      char c = expression.charAt(i);
      if (c == Nested || c == MappedStart) {
        return false;
      } else if (c == IndexedStart) { return true; }
    }
    return false;
  }
109103
public static boolean isVariableName(final String expression) {
        if (expression == null || expression.length() == 0) {
            return false;
        }

        if (expression.startsWith(Citrus.VARIABLE_PREFIX) && expression.endsWith(Citrus.VARIABLE_SUFFIX)) {
            return true;
        }

        return false;
    }
700734
@NonNull
    public Expression is(@NonNull Expression expression) {
        if (expression == null) {
            throw new IllegalArgumentException("expression cannot be null.");
        }
        return new BinaryExpression(this, expression, BinaryExpression.OpType.Is);
    }
1185705
public final CALC expression(String expression) throws ParseException {
        detectImplmentedExtension();
        
        if (infixParser == null)
            infixParser = new InfixParser();
        
        CList infix = infixParser.parse(useExtensions, getProperties(), expression);
        expression(infix, false);
        return getThis();
    }
1142483
public boolean containsLemma(String lemma) {
        return !Strings.isNullOrEmpty(lemma) && db.containsLemma(lemma.toLowerCase());
    }
933942
public boolean hasNested(String expression) {
    if (expression == null || expression.length() == 0) return false;
    else return remove(expression) != null;

  }
407827
private static StaticAnalysisResult isListExpressionEmpty(ForNode node) {
    Optional<RangeArgs> rangeArgs = RangeArgs.createFromNode(node);
    if (rangeArgs.isPresent()) {
      return isRangeExpressionEmpty(rangeArgs.get());
    }
    ExprNode expr = node.getExpr().getRoot();
    if (expr instanceof ListLiteralNode) {
      return ((ListLiteralNode) expr).numChildren() > 0
          ? StaticAnalysisResult.FALSE
          : StaticAnalysisResult.TRUE;
    }
    return StaticAnalysisResult.UNKNOWN;
  }
195517
static void checkTypes(ImmutableList<Type> types, Iterable<? extends Expression> exprs) {
    int size = Iterables.size(exprs);
    checkArgument(
        size == types.size(),
        "Supplied the wrong number of parameters. Expected %s, got %s",
        types.size(),
        size);
    // checkIsAssignableTo is an no-op if DEBUG is false
    if (Flags.DEBUG) {
      int i = 0;
      for (Expression expr : exprs) {
        expr.checkAssignableTo(types.get(i), "Parameter %s", i);
        i++;
      }
    }
  }
1036486
public BooleanExpression contains(Expression<String> str) {
        return Expressions.booleanOperation(Ops.STRING_CONTAINS, mixin, str);
    }
993957
public static Expression arrayContains(String expression, Expression value) {
        return arrayContains(x(expression), value);
    }
1250882
public static boolean isVariable(ASTNode expression, String pattern) {
        return (expression instanceof VariableExpression && ((VariableExpression) expression).getName().matches(pattern));
    }
891185
private static void checkNesting(final BooleanExpression expression,
			final List<BooleanExpression> visitedExpressions) {
		if (visitedExpressions.contains(expression)) {
			// Unfortunately, we can't give much more information - even calling toString() will overflow the stack.
			throw new SyntaxException("An expression can not contain itself.");
		}

		visitedExpressions.add(expression);

		if (expression instanceof GroupExpression) {
			GroupExpression group = (GroupExpression) expression;
			for (BooleanExpression operand : group.getOperands()) {
				checkNesting(operand, visitedExpressions);
			}
		}
	}
372812
public static boolean isValueReference(String expression)
  {
    if (null != expression)
    {
      int start = expression.indexOf("#{");
      if ((start >= 0) && (expression.indexOf('}', start + 1) >= 0))
      {
          return true;
      }
    }

    return false;
  }