@Test public void emptyFirstJustWorks() { DifferenceEvaluator d = DifferenceEvaluators.first(); assertEquals(ComparisonResult.DIFFERENT, d.evaluate(null, ComparisonResult.DIFFERENT)); }
public static DifferenceEvaluator first(final DifferenceEvaluator... evaluators) { return new DifferenceEvaluator() { @Override public ComparisonResult evaluate(Comparison comparison, ComparisonResult orig) { for (DifferenceEvaluator ev : evaluators) { ComparisonResult evaluated = ev.evaluate(comparison, orig); if (evaluated != orig) { return evaluated; } } return orig; } }; }
DifferenceEvaluators { public static DifferenceEvaluator first(final DifferenceEvaluator... evaluators) { return new DifferenceEvaluator() { @Override public ComparisonResult evaluate(Comparison comparison, ComparisonResult orig) { for (DifferenceEvaluator ev : evaluators) { ComparisonResult evaluated = ev.evaluate(comparison, orig); if (evaluated != orig) { return evaluated; } } return orig; } }; } }
DifferenceEvaluators { public static DifferenceEvaluator first(final DifferenceEvaluator... evaluators) { return new DifferenceEvaluator() { @Override public ComparisonResult evaluate(Comparison comparison, ComparisonResult orig) { for (DifferenceEvaluator ev : evaluators) { ComparisonResult evaluated = ev.evaluate(comparison, orig); if (evaluated != orig) { return evaluated; } } return orig; } }; } private  DifferenceEvaluators(); }
DifferenceEvaluators { public static DifferenceEvaluator first(final DifferenceEvaluator... evaluators) { return new DifferenceEvaluator() { @Override public ComparisonResult evaluate(Comparison comparison, ComparisonResult orig) { for (DifferenceEvaluator ev : evaluators) { ComparisonResult evaluated = ev.evaluate(comparison, orig); if (evaluated != orig) { return evaluated; } } return orig; } }; } private  DifferenceEvaluators(); static DifferenceEvaluator first(final DifferenceEvaluator... evaluators); static DifferenceEvaluator chain(final DifferenceEvaluator... evaluators); static DifferenceEvaluator downgradeDifferencesToEqual(ComparisonType... types); static DifferenceEvaluator downgradeDifferencesToSimilar(ComparisonType... types); static DifferenceEvaluator upgradeDifferencesToDifferent(ComparisonType... types); static DifferenceEvaluator ignorePrologDifferences(); static DifferenceEvaluator ignorePrologDifferencesExceptDoctype(); }
DifferenceEvaluators { public static DifferenceEvaluator first(final DifferenceEvaluator... evaluators) { return new DifferenceEvaluator() { @Override public ComparisonResult evaluate(Comparison comparison, ComparisonResult orig) { for (DifferenceEvaluator ev : evaluators) { ComparisonResult evaluated = ev.evaluate(comparison, orig); if (evaluated != orig) { return evaluated; } } return orig; } }; } private  DifferenceEvaluators(); static DifferenceEvaluator first(final DifferenceEvaluator... evaluators); static DifferenceEvaluator chain(final DifferenceEvaluator... evaluators); static DifferenceEvaluator downgradeDifferencesToEqual(ComparisonType... types); static DifferenceEvaluator downgradeDifferencesToSimilar(ComparisonType... types); static DifferenceEvaluator upgradeDifferencesToDifferent(ComparisonType... types); static DifferenceEvaluator ignorePrologDifferences(); static DifferenceEvaluator ignorePrologDifferencesExceptDoctype(); static final DifferenceEvaluator Accept; static final DifferenceEvaluator Default; }