/** * Indicates whether the current {@link Condition} is being negated. */ public static boolean isNegated(final EvaluationContext context) { return getNegationCount(context) % 2 == 1; }
/** * Indicates whether the current {@link Condition} is being negated. */ public static boolean isNegated(final EvaluationContext context) { return getNegationCount(context) % 2 == 1; }
/** * This increments the number of negations, allowing us to determine (during evaluation) whether the results of a particular * {@link Condition} will be negated. */ static void incrementNegationCount(final EvaluationContext context, int adjustment) { if (context == null) return; Integer count = Conditions.getNegationCount(context); count += adjustment; context.put(NEGATION_COUNT_KEY, count); }
/** * This increments the number of negations, allowing us to determine (during evaluation) whether the results of a particular * {@link Condition} will be negated. */ static void incrementNegationCount(final EvaluationContext context, int adjustment) { if (context == null) return; Integer count = Conditions.getNegationCount(context); count += adjustment; context.put(NEGATION_COUNT_KEY, count); }