Package org.xmlunit.diff
Class AbstractDifferenceEngine.ComparisonState
java.lang.Object
org.xmlunit.diff.AbstractDifferenceEngine.ComparisonState
- Direct Known Subclasses:
AbstractDifferenceEngine.FinishedComparisonState,AbstractDifferenceEngine.OngoingComparisonState
- Enclosing class:
- AbstractDifferenceEngine
Encapsulates the current result and a flag that
indicates whether comparison should be stopped.
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedComparisonState(boolean finished, ComparisonResult result) Creates a new ComparisonState. -
Method Summary
Modifier and TypeMethodDescriptionprotected AbstractDifferenceEngine.ComparisonStateandIfTrueThen(boolean predicate, AbstractDifferenceEngine.DeferredComparison newStateProducer) Maybe combines the current state with a different comparison.protected AbstractDifferenceEngine.ComparisonStateandIfTrueThen(boolean predicate, Comparison comp) Maybe combines the current state with a different comparison.protected AbstractDifferenceEngine.ComparisonStateandThen(AbstractDifferenceEngine.DeferredComparison newStateProducer) Combines the current state with a different comparison.protected AbstractDifferenceEngine.ComparisonStateandThen(Comparison comp) Combines the current state with a different comparison.booleaninthashCode()toString()
-
Constructor Details
-
ComparisonState
Creates a new ComparisonState.- Parameters:
finished- whether comparison should be stoppedresult- the current result
-
-
Method Details
-
andThen
protected AbstractDifferenceEngine.ComparisonState andThen(AbstractDifferenceEngine.DeferredComparison newStateProducer) Combines the current state with a different comparison.- Parameters:
newStateProducer- may be invoked to produce the next ConditionState- Returns:
- this if the comparison should be stopped and the result of invoking newStateProducer otherwise.
-
andIfTrueThen
protected AbstractDifferenceEngine.ComparisonState andIfTrueThen(boolean predicate, AbstractDifferenceEngine.DeferredComparison newStateProducer) Maybe combines the current state with a different comparison.- Parameters:
predicate- whether to combine the comparisonsnewStateProducer- may be invoked to produce the next ConditionState- Returns:
- this if the comparison should be stopped or predicate is false and the result of invoking newStateProducer otherwise.
-
andThen
Combines the current state with a different comparison.- Parameters:
comp- may be evaluated to produce the next ConditionState- Returns:
- this if the comparison should be stopped and the result of evaluating comp otherwise.
-
andIfTrueThen
protected AbstractDifferenceEngine.ComparisonState andIfTrueThen(boolean predicate, Comparison comp) Maybe combines the current state with a different comparison.- Parameters:
predicate- whether to combine the comparisonscomp- may be evaluated to produce the next ConditionState- Returns:
- this if the comparison should be stopped or predicate is false and the result of evaluating comp otherwise.
-
toString
-
equals
-
hashCode
public int hashCode()
-