private boolean checkChildren( LogicalExpression e, IdentityHashMap<LogicalExpression, Object> value, boolean transmitsConstant) { List<LogicalExpression> constants = Lists.newLinkedList(); boolean constant = true; for (LogicalExpression child : e) { if (child.accept(this, value)) { constants.add(child); } else { constant = false; } } // if one or more clauses isn't constant, this isn't constant. this also isn't a constant if it // operates on a set. if (!constant || !transmitsConstant) { for (LogicalExpression c : constants) { value.put(c, true); } } return constant && transmitsConstant; }