Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.modeshape.common.collection
Class ImmutableProblems

    java.lang.Object
      org.modeshape.common.collection.ImmutableProblems

All Implemented Interfaces:
  Serializable, Iterable<Problem>, Problems

    @Immutable
    public class ImmutableProblems

extends Object
implements Problems

An immutable wrapper for a mutable `Problems`.

See Also:
  Serialized Form

Constructor Summary
`ImmutableProblems(Problems delegate)`

Method Summary
`void` | `addAll(Iterable<Problem> problems)` Add all of the problems in the supplied list.
`void` | `addError(I18n message, Object... params)` Add an error message with the parameters that should be used when localizing the message.
`void` | `addError(int code, I18n message, Object... params)` Add an error message with the parameters that should be used when localizing the message.
`void` | `addError(int code, String resource, String location, I18n message, Object... params)` Add an error message with a description of the resource, its location, and the parameters that should be used when localizing the message
`void` | `addError(String resource, String location, I18n message, Object... params)` Add an error message with a description of the resource, its location, and the parameters that should be used when localizing the message
`void` | `addError(Throwable throwable, I18n message, Object... params)` Add an error exception and message with the parameters that should be used when localizing the message.
`void` | `addError(Throwable throwable, int code, I18n message, Object... params)` Add an error exception and message with the parameters that should be used when localizing the message.
`void` | `addError(Throwable throwable, int code, String resource, String location, I18n message, Object... params)` Add an error exception and message with a description of the resource, its location, and the parameters that should be used when localizing the message
`void` | `addError(Throwable throwable, String resource, String location, I18n message, Object... params)` Add an error exception and message with a description of the resource, its location, and the parameters that should be used when localizing the message
`void` | `addInfo(I18n message, Object... params)` Add a informational message with the parameters that should be used when localizing the message.
`void` | `addInfo(int code, I18n message, Object... params)` Add a informational message with the parameters that should be used when localizing the message.
`void` | `addInfo(int code, String resource, String location, I18n message, Object... params)` Add an informational message with a description of the resource, its location, and the parameters that should be used when localizing the message
`void` | `addInfo(String resource, String location, I18n message, Object... params)` Add an informational message with a description of the resource, its location, and the parameters that should be used when localizing the message
`void` | `addInfo(Throwable throwable, I18n message, Object... params)` Add an informational exception and message with the parameters that should be used when localizing the message.
`void` | `addInfo(Throwable throwable, int code, I18n message, Object... params)` Add a informational exception and message with the parameters that should be used when localizing the message.
`void` | `addInfo(Throwable throwable, int code, String resource, String location, I18n message, Object... params)` Add an informational exception and message with a description of the resource, its location, and the parameters that should be used when localizing the message
`void` | `addInfo(Throwable throwable, String resource, String location, I18n message, Object... params)` Add an informational exception and message with a description of the resource, its location, and the parameters that should be used when localizing the message
`void` | `addWarning(I18n message, Object... params)` Add a warning message with the parameters that should be used when localizing the message.
`void` | `addWarning(int code, I18n message, Object... params)` Add a warning message with the parameters that should be used when localizing the message.
`void` | `addWarning(int code, String resource, String location, I18n message, Object... params)` Add a warning message with a description of the resource, its location, and the parameters that should be used when localizing the message
`void` | `addWarning(String resource, String location, I18n message, Object... params)` Add a warning message with a description of the resource, its location, and the parameters that should be used when localizing the message
`void` | `addWarning(Throwable throwable, I18n message, Object... params)` Add a warning exception and message with the parameters that should be used when localizing the message.
`void` | `addWarning(Throwable throwable, int code, I18n message, Object... params)` Add a warning exception and message with the parameters that should be used when localizing the message.
`void` | `addWarning(Throwable throwable, int code, String resource, String location, I18n message, Object... params)` Add a warning exception and message with a description of the resource, its location, and the parameters that should be used when localizing the message
`void` | `addWarning(Throwable throwable, String resource, String location, I18n message, Object... params)` Add a warning exception and message with a description of the resource, its location, and the parameters that should be used when localizing the message
`boolean` | `hasErrors()` Determine if there is at least one error in this collection.
`boolean` | `hasInfo()` Determine if there is at least one informational problem in this collection.
`boolean` | `hasProblems()` Determine if there are problems in this collection.
`boolean` | `hasWarnings()` Determine if there is at least one warning in this collection.
`boolean` | `isEmpty()` Determine if this collection is empty.
`Iterator<Problem>` | `iterator()`
`int` | `size()` Get the number of problems that are in this collection
`String` | `toString()`
`void` | `writeTo(Logger logger)` Write the problems to the supplied logger.
`void` | `writeTo(Logger logger, Problem.Status firstStatus, Problem.Status... additionalStatuses)` Write the problems to the supplied logger.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### ImmutableProblems

    public ImmutableProblems(Problems delegate)

Method Detail

### addError

    public void addError(I18n message,
                         Object... params)

  Add an error message with the parameters that should be used when localizing the message.

  Specified by:
    `addError` in interface `Problems`
  Parameters:
    `message` - the internationalized message describing the problem
    `params` - the values for the parameters in the message
  See Also:
    `Problems.addError(org.modeshape.common.i18n.I18n, java.lang.Object[])`

### addError

    public void addError(String resource,
                         String location,
                         I18n message,
                         Object... params)

  Add an error message with a description of the resource, its location, and the parameters that should be used when localizing the message

  Specified by:
    `addError` in interface `Problems`
  Parameters:
    `resource` - the description of the resource; may be null
    `location` - the location of the resource; may be null
    `message` - the internationalized message describing the problem
    `params` - the values for the parameters in the message
  See Also:
    `Problems.addError(java.lang.String, java.lang.String, org.modeshape.common.i18n.I18n, java.lang.Object[])`

### addError

    public void addError(int code,
                         I18n message,
                         Object... params)

  Add an error message with the parameters that should be used when localizing the message.

  Specified by:
    `addError` in interface `Problems`
  Parameters:
    `code` - the error code
    `message` - the internationalized message describing the problem
    `params` - the values for the parameters in the message
  See Also:
    `Problems.addError(int, org.modeshape.common.i18n.I18n, java.lang.Object[])`

### addError

    public void addError(int code,
                         String resource,
                         String location,
                         I18n message,
                         Object... params)

  Add an error message with a description of the resource, its location, and the parameters that should be used when localizing the message

  Specified by:
    `addError` in interface `Problems`
  Parameters:
    `code` - the error code
    `resource` - the description of the resource; may be null
    `location` - the location of the resource; may be null
    `message` - the internationalized message describing the problem
    `params` - the values for the parameters in the message
  See Also:
    `Problems.addError(int, String, String, I18n, Object...)`

### addError

    public void addError(Throwable throwable,
                         I18n message,
                         Object... params)

  Add an error exception and message with the parameters that should be used when localizing the message.

  Specified by:
    `addError` in interface `Problems`
  Parameters:
    `throwable` - the exception that represents the error; may be null
    `message` - the internationalized message describing the problem
    `params` - the values for the parameters in the message
  See Also:
    `Problems.addError(java.lang.Throwable, org.modeshape.common.i18n.I18n, java.lang.Object[])`

### addError

    public void addError(Throwable throwable,
                         String resource,
                         String location,
                         I18n message,
                         Object... params)

  Add an error exception and message with a description of the resource, its location, and the parameters that should be used when localizing the message

  Specified by:
    `addError` in interface `Problems`
  Parameters:
    `throwable` - the exception that represents the error; may be null
    `resource` - the description of the resource; may be null
    `location` - the location of the resource; may be null
    `message` - the internationalized message describing the problem
    `params` - the values for the parameters in the message
  See Also:
    `Problems.addError(java.lang.Throwable, java.lang.String, java.lang.String, org.modeshape.common.i18n.I18n,java.lang.Object[])`

### addError

    public void addError(Throwable throwable,
                         int code,
                         I18n message,
                         Object... params)

  Add an error exception and message with the parameters that should be used when localizing the message.

  Specified by:
    `addError` in interface `Problems`
  Parameters:
    `throwable` - the exception that represents the error; may be null
    `code` - the error code
    `message` - the internationalized message describing the problem
    `params` - the values for the parameters in the message
  See Also:
    `Problems.addError(java.lang.Throwable, int, org.modeshape.common.i18n.I18n, java.lang.Object[])`

### addError

    public void addError(Throwable throwable,
                         int code,
                         String resource,
                         String location,
                         I18n message,
                         Object... params)

  Add an error exception and message with a description of the resource, its location, and the parameters that should be used when localizing the message

  Specified by:
    `addError` in interface `Problems`
  Parameters:
    `throwable` - the exception that represents the error; may be null
    `code` - the error code
    `resource` - the description of the resource; may be null
    `location` - the location of the resource; may be null
    `message` - the internationalized message describing the problem
    `params` - the values for the parameters in the message
  See Also:
    `Problems.addError(java.lang.Throwable, int, java.lang.String, java.lang.String, org.modeshape.common.i18n.I18n, java.lang.Object[])`

### addInfo

    public void addInfo(I18n message,
                        Object... params)

  Add a informational message with the parameters that should be used when localizing the message.

  Specified by:
    `addInfo` in interface `Problems`
  Parameters:
    `message` - the internationalized message describing the problem
    `params` - the values for the parameters in the message
  See Also:
    `Problems.addInfo(org.modeshape.common.i18n.I18n, java.lang.Object[])`

### addInfo

    public void addInfo(String resource,
                        String location,
                        I18n message,
                        Object... params)

  Add an informational message with a description of the resource, its location, and the parameters that should be used when localizing the message

  Specified by:
    `addInfo` in interface `Problems`
  Parameters:
    `resource` - the description of the resource; may be null
    `location` - the location of the resource; may be null
    `message` - the internationalized message describing the problem
    `params` - the values for the parameters in the message
  See Also:
    `Problems.addInfo(java.lang.String, java.lang.String, org.modeshape.common.i18n.I18n, java.lang.Object[])`

### addInfo

    public void addInfo(int code,
                        I18n message,
                        Object... params)

  Add a informational message with the parameters that should be used when localizing the message.

  Specified by:
    `addInfo` in interface `Problems`
  Parameters:
    `code` - the problem code
    `message` - the internationalized message describing the problem
    `params` - the values for the parameters in the message
  See Also:
    `Problems.addInfo(int, org.modeshape.common.i18n.I18n, java.lang.Object[])`

### addInfo

    public void addInfo(int code,
                        String resource,
                        String location,
                        I18n message,
                        Object... params)

  Add an informational message with a description of the resource, its location, and the parameters that should be used when localizing the message

  Specified by:
    `addInfo` in interface `Problems`
  Parameters:
    `code` - the problem code
    `resource` - the description of the resource; may be null
    `location` - the location of the resource; may be null
    `message` - the internationalized message describing the problem
    `params` - the values for the parameters in the message
  See Also:
    `Problems.addInfo(int, java.lang.String, java.lang.String, org.modeshape.common.i18n.I18n, java.lang.Object[])`

### addInfo

    public void addInfo(Throwable throwable,
                        I18n message,
                        Object... params)

  Add an informational exception and message with the parameters that should be used when localizing the message.

  Specified by:
    `addInfo` in interface `Problems`
  Parameters:
    `throwable` - the exception that represents the warning; may be null
    `message` - the internationalized message describing the problem
    `params` - the values for the parameters in the message
  See Also:
    `Problems.addInfo(java.lang.Throwable, org.modeshape.common.i18n.I18n, java.lang.Object[])`

### addInfo

    public void addInfo(Throwable throwable,
                        String resource,
                        String location,
                        I18n message,
                        Object... params)

  Add an informational exception and message with a description of the resource, its location, and the parameters that should be used when localizing the message

  Specified by:
    `addInfo` in interface `Problems`
  Parameters:
    `throwable` - the exception that represents the problem; may be null
    `resource` - the description of the resource; may be null
    `location` - the location of the resource; may be null
    `message` - the internationalized message describing the problem
    `params` - the values for the parameters in the message
  See Also:
    `Problems.addInfo(java.lang.Throwable, java.lang.String, java.lang.String, org.modeshape.common.i18n.I18n, java.lang.Object[])`

### addInfo

    public void addInfo(Throwable throwable,
                        int code,
                        I18n message,
                        Object... params)

  Add a informational exception and message with the parameters that should be used when localizing the message.

  Specified by:
    `addInfo` in interface `Problems`
  Parameters:
    `throwable` - the exception that represents the warning; may be null
    `code` - the problem code
    `message` - the internationalized message describing the problem
    `params` - the values for the parameters in the message
  See Also:
    `Problems.addInfo(java.lang.Throwable, int, org.modeshape.common.i18n.I18n, java.lang.Object[])`

### addInfo

    public void addInfo(Throwable throwable,
                        int code,
                        String resource,
                        String location,
                        I18n message,
                        Object... params)

  Add an informational exception and message with a description of the resource, its location, and the parameters that should be used when localizing the message

  Specified by:
    `addInfo` in interface `Problems`
  Parameters:
    `throwable` - the exception that represents the problem; may be null
    `code` - the problem code
    `resource` - the description of the resource; may be null
    `location` - the location of the resource; may be null
    `message` - the internationalized message describing the problem
    `params` - the values for the parameters in the message
  See Also:
    `Problems.addInfo(java.lang.Throwable, int, java.lang.String, java.lang.String, org.modeshape.common.i18n.I18n, java.lang.Object[])`

### addWarning

    public void addWarning(I18n message,
                           Object... params)

  Add a warning message with the parameters that should be used when localizing the message.

  Specified by:
    `addWarning` in interface `Problems`
  Parameters:
    `message` - the internationalized message describing the problem
    `params` - the values for the parameters in the message
  See Also:
    `Problems.addWarning(org.modeshape.common.i18n.I18n, java.lang.Object[])`

### addWarning

    public void addWarning(String resource,
                           String location,
                           I18n message,
                           Object... params)

  Add a warning message with a description of the resource, its location, and the parameters that should be used when localizing the message

  Specified by:
    `addWarning` in interface `Problems`
  Parameters:
    `resource` - the description of the resource; may be null
    `location` - the location of the resource; may be null
    `message` - the internationalized message describing the problem
    `params` - the values for the parameters in the message
  See Also:
    `Problems.addWarning(java.lang.String, java.lang.String, org.modeshape.common.i18n.I18n, java.lang.Object[])`

### addWarning

    public void addWarning(int code,
                           I18n message,
                           Object... params)

  Add a warning message with the parameters that should be used when localizing the message.

  Specified by:
    `addWarning` in interface `Problems`
  Parameters:
    `code` - the problem code
    `message` - the internationalized message describing the problem
    `params` - the values for the parameters in the message
  See Also:
    `Problems.addWarning(int, org.modeshape.common.i18n.I18n, java.lang.Object[])`

### addWarning

    public void addWarning(int code,
                           String resource,
                           String location,
                           I18n message,
                           Object... params)

  Add a warning message with a description of the resource, its location, and the parameters that should be used when localizing the message

  Specified by:
    `addWarning` in interface `Problems`
  Parameters:
    `code` - the problem code
    `resource` - the description of the resource; may be null
    `location` - the location of the resource; may be null
    `message` - the internationalized message describing the problem
    `params` - the values for the parameters in the message
  See Also:
    `Problems.addWarning(int, java.lang.String, java.lang.String, org.modeshape.common.i18n.I18n, java.lang.Object[])`

### addWarning

    public void addWarning(Throwable throwable,
                           I18n message,
                           Object... params)

  Add a warning exception and message with the parameters that should be used when localizing the message.

  Specified by:
    `addWarning` in interface `Problems`
  Parameters:
    `throwable` - the exception that represents the error; may be null
    `message` - the internationalized message describing the problem
    `params` - the values for the parameters in the message
  See Also:
    `Problems.addWarning(java.lang.Throwable, org.modeshape.common.i18n.I18n, java.lang.Object[])`

### addWarning

    public void addWarning(Throwable throwable,
                           String resource,
                           String location,
                           I18n message,
                           Object... params)

  Add a warning exception and message with a description of the resource, its location, and the parameters that should be used when localizing the message

  Specified by:
    `addWarning` in interface `Problems`
  Parameters:
    `throwable` - the exception that represents the warning; may be null
    `resource` - the description of the resource; may be null
    `location` - the location of the resource; may be null
    `message` - the internationalized message describing the problem
    `params` - the values for the parameters in the message
  See Also:
    `Problems.addWarning(java.lang.Throwable, java.lang.String, java.lang.String , org.modeshape.common.i18n.I18n,java.lang.Object[])`

### addWarning

    public void addWarning(Throwable throwable,
                           int code,
                           I18n message,
                           Object... params)

  Add a warning exception and message with the parameters that should be used when localizing the message.

  Specified by:
    `addWarning` in interface `Problems`
  Parameters:
    `throwable` - the exception that represents the warning; may be null
    `code` - the problem code
    `message` - the internationalized message describing the problem
    `params` - the values for the parameters in the message
  See Also:
    `Problems.addWarning(java.lang.Throwable, int, org.modeshape.common.i18n.I18n, java.lang.Object[])`

### addWarning

    public void addWarning(Throwable throwable,
                           int code,
                           String resource,
                           String location,
                           I18n message,
                           Object... params)

  Add a warning exception and message with a description of the resource, its location, and the parameters that should be used when localizing the message

  Specified by:
    `addWarning` in interface `Problems`
  Parameters:
    `throwable` - the exception that represents the warning; may be null
    `code` - the problem code
    `resource` - the description of the resource; may be null
    `location` - the location of the resource; may be null
    `message` - the internationalized message describing the problem
    `params` - the values for the parameters in the message
  See Also:
    `Problems.addWarning(java.lang.Throwable, int, java.lang.String, java.lang.String, org.modeshape.common.i18n.I18n,java.lang.Object[])`

### addAll

    public void addAll(Iterable<Problem> problems)

  Add all of the problems in the supplied list.

  Specified by:
    `addAll` in interface `Problems`
  Parameters:
    `problems` - the problems to add to this list; this method does nothing if null or empty
  See Also:
    `Problems.addAll(java.lang.Iterable)`

### hasErrors

    public boolean hasErrors()

  Determine if there is at least one error in this collection.

  Specified by:
    `hasErrors` in interface `Problems`
  Returns:
    true if there is at least one error in this collection, or false if there are no errors
  See Also:
    `Problems.hasErrors()`

### hasInfo

    public boolean hasInfo()

  Determine if there is at least one informational problem in this collection.

  Specified by:
    `hasInfo` in interface `Problems`
  Returns:
    true if there is at least one informational problem in this collection, or false if there are no informational problems
  See Also:
    `Problems.hasInfo()`

### hasProblems

    public boolean hasProblems()

  Determine if there are problems in this collection.

  Specified by:
    `hasProblems` in interface `Problems`
  Returns:
    true if there is at least one problem, or false if it is empty
  See Also:
    `Problems.hasProblems()`

### hasWarnings

    public boolean hasWarnings()

  Determine if there is at least one warning in this collection.

  Specified by:
    `hasWarnings` in interface `Problems`
  Returns:
    true if there is at least one warning in this collection, or false if there are no warnings
  See Also:
    `Problems.hasWarnings()`

### isEmpty

    public boolean isEmpty()

  Determine if this collection is empty.

  Specified by:
    `isEmpty` in interface `Problems`
  Returns:
    true if the there are no problems, or false if there is at least one
  See Also:
    `Problems.isEmpty()`

### iterator

    public Iterator<Problem> iterator()

  Specified by:
    `iterator` in interface `Iterable<Problem>`
  Specified by:
    `iterator` in interface `Problems`
  See Also:
    `Problems.iterator()`

### size

    public int size()

  Get the number of problems that are in this collection

  Specified by:
    `size` in interface `Problems`
  Returns:
    the number of problems; never negative
  See Also:
    `Problems.size()`

### toString

    public String toString()

  Overrides:
    `toString` in class `Object`
  See Also:
    `Object.toString()`

### writeTo

    public void writeTo(Logger logger)

  Write the problems to the supplied logger.

  Specified by:
    `writeTo` in interface `Problems`
  Parameters:
    `logger` - the logger
  See Also:
    `Problems.writeTo(org.modeshape.common.util.Logger)`

### writeTo

    public void writeTo(Logger logger,
                        Problem.Status firstStatus,
                        Problem.Status... additionalStatuses)

  Write the problems to the supplied logger.

  Specified by:
    `writeTo` in interface `Problems`
  Parameters:
    `logger` - the logger
    `firstStatus` - the first status to be logged
    `additionalStatuses` - the additional statuses to be logged
  See Also:
    `Problems.writeTo(org.modeshape.common.util.Logger, org.modeshape.common.collection.Problem.Status, org.modeshape.common.collection.Problem.Status[])`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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