org.modeshape.common.collection

## Class Problem

- java.lang.Object
- - org.modeshape.common.collection.Problem

-     @Immutable
      public class Problem
      extends Object

  An immutable representation of a problem, with a status, code, internationalized and parameterized message, values for the parameters, information about the resource and location, and an optional exception. The use of internationalized messages allows for automatic localization of the messages (and substitution of the parameter values) via the `getMessageString()` method.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `Problem.Status`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static int` | `DEFAULT_CODE`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `Problem(Problem.Status status, int code, I18n message, Object[] params, String resource, String location, Throwable throwable)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `equals(Object obj)`
    `int` | `getCode()`
    `String` | `getLocation()`
    `I18n` | `getMessage()`
    `String` | `getMessageString()` Get the message written in the current locale.
    `Object[]` | `getParameters()`
    `String` | `getResource()`
    `Problem.Status` | `getStatus()`
    `Throwable` | `getThrowable()`
    `int` | `hashCode()`
    `String` | `toString()`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### DEFAULT_CODE

          public static final int DEFAULT_CODE

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### Problem

          public Problem(Problem.Status status,
                 int code,
                 I18n message,
                 Object[] params,
                 String resource,
                 String location,
                 Throwable throwable)

  - ### Method Detail

    - #### getCode

          public int getCode()

    - #### getLocation

          public String getLocation()

    - #### getMessageString

          public String getMessageString()

      Get the message written in the current locale.
      Returns:
        the message

    - #### getMessage

          public I18n getMessage()

    - #### getParameters

          public Object[] getParameters()

    - #### getResource

          public String getResource()

    - #### getStatus

          public Problem.Status getStatus()

    - #### getThrowable

          public Throwable getThrowable()

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

    - #### equals

          public boolean equals(Object obj)

      Overrides:
        `equals` in class `Object`

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

Copyright © 2008-2014 JBoss, a division of Red Hat. All Rights Reserved.