Class Result

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  Result.Status
      The status of a Result.
    • Constructor Summary

      Constructors 
      Constructor Description
      Result​(Result.Status s, java.lang.String explanation)
      Build a single-value Result
      Result​(Result.Status s, java.lang.String explanation, java.lang.Exception e)
      Build a single-value Result with exception
      Result​(ResultLog log)
      Build a a Result based on a ResultLog, which can provide more details than a single-value Result
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      Result.Status getStatus()  
      boolean isOk()
      True if our status is OK - provides a convenient way of checking that
      java.util.Iterator<ResultLog.Entry> iterator()  
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface java.lang.Iterable

        forEach, spliterator
    • Constructor Detail

      • Result

        public Result​(Result.Status s,
                      java.lang.String explanation)
        Build a single-value Result
        Parameters:
        s - if lower than OK, our status is set to OK
        explanation - message for the status
      • Result

        public Result​(Result.Status s,
                      java.lang.String explanation,
                      java.lang.Exception e)
        Build a single-value Result with exception
        Parameters:
        s - if lower than OK, our status is set to OK
        explanation - message for the status
        e - the exception for this Result
      • Result

        public Result​(ResultLog log)
        Build a a Result based on a ResultLog, which can provide more details than a single-value Result
        Parameters:
        log - the log to base the result on
    • Method Detail

      • isOk

        public boolean isOk()
        True if our status is OK - provides a convenient way of checking that
        Returns:
        true if the status is ok.
      • getStatus

        public Result.Status getStatus()
        Returns:
        the status of this result
      • iterator

        public java.util.Iterator<ResultLog.Entry> iterator()
        Specified by:
        iterator in interface java.lang.Iterable<ResultLog.Entry>
        Returns:
        an Iterator on the entries of our ResultLog
      • toString

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