Class DefaultFailure

  • All Implemented Interfaces:
    Failure

    public final class DefaultFailure
    extends java.lang.Object
    implements Failure
    • Constructor Summary

      Constructors 
      Constructor Description
      DefaultFailure​(java.lang.String message, java.lang.String description, java.util.List<? extends Failure> causes)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static DefaultFailure fromThrowable​(java.lang.Throwable t)  
      java.util.List<? extends Failure> getCauses()
      Returns the underlying causes for this failure, if any.
      java.lang.String getDescription()
      Returns a long description of the failure.
      java.lang.String getMessage()
      Returns a short message (typically one line) for the failure.
      • Methods inherited from class java.lang.Object

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

      • DefaultFailure

        public DefaultFailure​(java.lang.String message,
                              java.lang.String description,
                              java.util.List<? extends Failure> causes)
    • Method Detail

      • getMessage

        public java.lang.String getMessage()
        Description copied from interface: Failure
        Returns a short message (typically one line) for the failure.
        Specified by:
        getMessage in interface Failure
        Returns:
        the failure message
      • getDescription

        public java.lang.String getDescription()
        Description copied from interface: Failure
        Returns a long description of the failure. For example, a stack trace.
        Specified by:
        getDescription in interface Failure
        Returns:
        a long description of the failure
      • getCauses

        public java.util.List<? extends Failure> getCauses()
        Description copied from interface: Failure
        Returns the underlying causes for this failure, if any.
        Specified by:
        getCauses in interface Failure
        Returns:
        the causes for this failure. Returns an empty list if this failure has no causes.
      • fromThrowable

        public static DefaultFailure fromThrowable​(java.lang.Throwable t)