Class ConditionEvaluationResult


  • class ConditionEvaluationResult
    extends java.lang.Object
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private boolean successful  
      private java.lang.Throwable throwable  
      private java.lang.Throwable trace  
    • Constructor Summary

      Constructors 
      Constructor Description
      ConditionEvaluationResult​(boolean successful)
      Return the result of the condition evaluation as either just true or false.
      ConditionEvaluationResult​(boolean successful, java.lang.Throwable throwable, java.lang.Throwable trace)
      Fail the condition evaluation due to an exception with an optional trace.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object o)  
      (package private) java.lang.Throwable getThrowable()  
      (package private) java.lang.Throwable getTrace()  
      int hashCode()  
      (package private) boolean hasThrowable()  
      (package private) boolean hasTrace()  
      (package private) boolean isError()  
      (package private) boolean isSuccessful()  
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Field Detail

      • trace

        private final java.lang.Throwable trace
      • throwable

        private final java.lang.Throwable throwable
      • successful

        private final boolean successful
    • Constructor Detail

      • ConditionEvaluationResult

        ConditionEvaluationResult​(boolean successful)
        Return the result of the condition evaluation as either just true or false. If false this means that the condition could be retried later.
        Parameters:
        successful - true or false
      • ConditionEvaluationResult

        ConditionEvaluationResult​(boolean successful,
                                  java.lang.Throwable throwable,
                                  java.lang.Throwable trace)
        Fail the condition evaluation due to an exception with an optional trace. The purpose of the trace is to identify where in the code (which line) that contained the condition that failed. Note that a trace is independent of the throwable (i.e. the condition must necessarily have failed with an exception)
        Parameters:
        throwable - The exception that caused the condition to fail
    • Method Detail

      • isSuccessful

        boolean isSuccessful()
      • isError

        boolean isError()
      • getThrowable

        java.lang.Throwable getThrowable()
      • getTrace

        java.lang.Throwable getTrace()
      • hasThrowable

        boolean hasThrowable()
      • hasTrace

        boolean hasTrace()
      • equals

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

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

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