Class Result


  • public class Result
    extends java.lang.Object
    A Result class.
    Since:
    1.2.6
    Author:
    unknown
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static Result PASS  
    • Constructor Summary

      Constructors 
      Constructor Description
      Result​(boolean failed)  
      Result​(boolean failed, java.lang.String message)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static Result fail​(java.lang.String message)
      Returns a Result which failed.
      java.lang.String getMessage()
      Retrieves the error message.
      static Result pass()
      Returns a Result which passed.
      boolean wasFailed()
      Returns true if the Result was a failure.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • PASS

        public static final Result PASS
    • Constructor Detail

      • Result

        public Result​(boolean failed)
      • Result

        public Result​(boolean failed,
                      java.lang.String message)
    • Method Detail

      • fail

        public static Result fail​(java.lang.String message)
        Returns a Result which failed.
        Parameters:
        message - an error message
        Returns:
        a Result which failed
      • pass

        public static Result pass()
        Returns a Result which passed.
        Returns:
        a Result which passed
      • wasFailed

        public boolean wasFailed()
        Returns true if the Result was a failure.
        Returns:
        true if the Result was a failure
      • getMessage

        public java.lang.String getMessage()
        Retrieves the error message.
        Returns:
        the error message