Class AbstractDifferenceEngine.ComparisonState

    • Field Detail

      • finished

        private final boolean finished
    • Constructor Detail

      • ComparisonState

        protected ComparisonState​(boolean finished,
                                  ComparisonResult result)
        Creates a new ComparisonState.
        Parameters:
        finished - whether comparison should be stopped
        result - the current result
    • Method Detail

      • 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 comparisons
        newStateProducer - 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

        protected AbstractDifferenceEngine.ComparisonState andThen​(Comparison comp)
        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 comparisons
        comp - 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

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object other)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object