Class LocalizedProblem

  • All Implemented Interfaces:
    Problem


    @Immutable
    public class LocalizedProblem
    extends java.lang.Object
    implements Problem
    Problem with a simple, localized message text.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object other)  
      static LocalizedProblem from​(java.lang.String localizedMessage)
      Create a problem from a localized string.
      int hashCode​()  
      java.lang.String localMessage​()
      A human-consumable message describing the problem.
      java.lang.String toString​()  
      • Methods inherited from class java.lang.Object

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

      • from

        public static LocalizedProblem from​(@Nonnull
                                            java.lang.String localizedMessage)
        Create a problem from a localized string.
        Parameters:
        localizedMessage - message text for the problem.
        Returns:
        the problem value.
      • localMessage

        @Nonnull
        public java.lang.String localMessage​()
        Description copied from interface: Problem
        A human-consumable message describing the problem.
        Specified by:
        localMessage in interface Problem
        Returns:
        the message, localized for the end-user.
      • toString

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

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

        public boolean equals​(java.lang.Object other)
        Overrides:
        equals in class java.lang.Object