List<PreContract> (List<ValueConstraint[]> states, @NotNull LighterASTNode expr) { if (firstChildOfType(myTree, expr, JavaTokenType.PLUS) != null) { return asPreContracts(ContainerUtil.map(states, s -> new StandardMethodContract(s, returnNotNull()))); } List<LighterASTNode> operands = getExpressionChildren(myTree, expr); if (operands.size() == 2) { boolean equality = firstChildOfType(myTree, expr, JavaTokenType.EQEQ) != null; if (equality || firstChildOfType(myTree, expr, JavaTokenType.NE) != null) { return asPreContracts(visitEqualityComparison(states, operands.get(0), operands.get(1), equality)); } } boolean logicalAnd = firstChildOfType(myTree, expr, JavaTokenType.ANDAND) != null; if (logicalAnd || firstChildOfType(myTree, expr, JavaTokenType.OROR) != null) { return asPreContracts(visitLogicalOperation(operands, logicalAnd, states)); } return emptyList(); }