Class MatchingPromise<T>


  • public class MatchingPromise<T>
    extends Promise<T>
    A promise which only sets the result if it matches the expected result
    Since:
    4.0.16
    Author:
    Bela Ban
    • Field Detail

      • expected_result

        protected T expected_result
    • Constructor Detail

      • MatchingPromise

        public MatchingPromise​(T expected_result)
    • Method Detail

      • getExpectedResult

        public T getExpectedResult()
      • setResult

        public void setResult​(T result)
        Sets the result only if expected_result matches result
        Overrides:
        setResult in class Promise<T>
      • reset

        public void reset​(T expected_result)
      • reset

        public void reset​(T expected_result,
                          boolean signal)
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class Promise<T>