Class DefaultProblem

  • All Implemented Interfaces:
    Problem

    public final class DefaultProblem
    extends java.lang.Object
    implements Problem
    The default implementation of Problem.
    Version:
    2.4
    Author:
    Pascal Filion
    Since:
    2.4
    • Constructor Summary

      Constructors 
      Constructor Description
      DefaultProblem​(StateObject stateObject, java.lang.String messageKey, java.lang.String[] arguments)
      Creates a new DefaultProblem.
    • Constructor Detail

      • DefaultProblem

        public DefaultProblem​(StateObject stateObject,
                              java.lang.String messageKey,
                              java.lang.String[] arguments)
        Creates a new DefaultProblem.
        Parameters:
        stateObject - The StateObject where the problem was found
        messageKey - The key used to retrieve the localized message describing the problem found with the current state of this StateObject
        arguments - A list of arguments that can be used to complete the message or an empty list if no additional information is necessary
    • Method Detail

      • getMessageArguments

        public java.lang.String[] getMessageArguments()
        Returns the arguments associate with the problem's message.
        Specified by:
        getMessageArguments in interface Problem
        Returns:
        A non-null list of arguments that can be used to format the localized message
      • getMessageKey

        public java.lang.String getMessageKey()
        Returns the key used to retrieve the localized message describing the problem found in the StateObject.
        Specified by:
        getMessageKey in interface Problem
        Returns:
        The key used to retrieve the localized message
      • toString

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