Class DefaultProblem

  • All Implemented Interfaces:
    Problem

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

      • DefaultProblem

        public DefaultProblem​(StateObject stateObject,
                              String messageKey,
                              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 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 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