ModeShape Distribution 3.0.0.Beta4

org.modeshape.common.collection
Class ImmutableProblems

java.lang.Object
  extended by 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
 int errorCount()
          Determine the number of errors within these results.
 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.
 int infoCount()
          Determine the number of information messages within these results.
 boolean isEmpty()
          Determine if this collection is empty.
 Iterator<Problem> iterator()
          
 int problemCount()
          Determine the number of problems (that is, errors and warnings) within these results.
 int size()
          Get the number of problems that are in this collection
 String toString()
           
 int warningCount()
          Determine the number of warnings within these results.
 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)
Description copied from interface: Problems
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

addError

public void addError(String resource,
                     String location,
                     I18n message,
                     Object... params)
Description copied from interface: Problems
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

addError

public void addError(int code,
                     I18n message,
                     Object... params)
Description copied from interface: Problems
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

addError

public void addError(int code,
                     String resource,
                     String location,
                     I18n message,
                     Object... params)
Description copied from interface: Problems
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

addError

public void addError(Throwable throwable,
                     I18n message,
                     Object... params)
Description copied from interface: Problems
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

addError

public void addError(Throwable throwable,
                     String resource,
                     String location,
                     I18n message,
                     Object... params)
Description copied from interface: Problems
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

addError

public void addError(Throwable throwable,
                     int code,
                     I18n message,
                     Object... params)
Description copied from interface: Problems
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

addError

public void addError(Throwable throwable,
                     int code,
                     String resource,
                     String location,
                     I18n message,
                     Object... params)
Description copied from interface: Problems
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

addInfo

public void addInfo(I18n message,
                    Object... params)
Description copied from interface: Problems
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

addInfo

public void addInfo(String resource,
                    String location,
                    I18n message,
                    Object... params)
Description copied from interface: Problems
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

addInfo

public void addInfo(int code,
                    I18n message,
                    Object... params)
Description copied from interface: Problems
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

addInfo

public void addInfo(int code,
                    String resource,
                    String location,
                    I18n message,
                    Object... params)
Description copied from interface: Problems
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

addInfo

public void addInfo(Throwable throwable,
                    I18n message,
                    Object... params)
Description copied from interface: Problems
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

addInfo

public void addInfo(Throwable throwable,
                    String resource,
                    String location,
                    I18n message,
                    Object... params)
Description copied from interface: Problems
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

addInfo

public void addInfo(Throwable throwable,
                    int code,
                    I18n message,
                    Object... params)
Description copied from interface: Problems
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

addInfo

public void addInfo(Throwable throwable,
                    int code,
                    String resource,
                    String location,
                    I18n message,
                    Object... params)
Description copied from interface: Problems
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

addWarning

public void addWarning(I18n message,
                       Object... params)
Description copied from interface: Problems
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

addWarning

public void addWarning(String resource,
                       String location,
                       I18n message,
                       Object... params)
Description copied from interface: Problems
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

addWarning

public void addWarning(int code,
                       I18n message,
                       Object... params)
Description copied from interface: Problems
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

addWarning

public void addWarning(int code,
                       String resource,
                       String location,
                       I18n message,
                       Object... params)
Description copied from interface: Problems
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

addWarning

public void addWarning(Throwable throwable,
                       I18n message,
                       Object... params)
Description copied from interface: Problems
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

addWarning

public void addWarning(Throwable throwable,
                       String resource,
                       String location,
                       I18n message,
                       Object... params)
Description copied from interface: Problems
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

addWarning

public void addWarning(Throwable throwable,
                       int code,
                       I18n message,
                       Object... params)
Description copied from interface: Problems
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

addWarning

public void addWarning(Throwable throwable,
                       int code,
                       String resource,
                       String location,
                       I18n message,
                       Object... params)
Description copied from interface: Problems
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

addAll

public void addAll(Iterable<Problem> problems)
Description copied from interface: 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

hasErrors

public boolean hasErrors()
Description copied from interface: Problems
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

hasInfo

public boolean hasInfo()
Description copied from interface: Problems
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

hasProblems

public boolean hasProblems()
Description copied from interface: Problems
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.isEmpty(), Problems.size()

hasWarnings

public boolean hasWarnings()
Description copied from interface: Problems
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

isEmpty

public boolean isEmpty()
Description copied from interface: Problems
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.hasProblems(), Problems.size()

errorCount

public int errorCount()
Description copied from interface: Problems
Determine the number of errors within these results.

Specified by:
errorCount in interface Problems
Returns:
the number of errors; always 0 or a positive number

problemCount

public int problemCount()
Description copied from interface: Problems
Determine the number of problems (that is, errors and warnings) within these results.

Specified by:
problemCount in interface Problems
Returns:
the number of errors and warnings; always 0 or a positive number

warningCount

public int warningCount()
Description copied from interface: Problems
Determine the number of warnings within these results.

Specified by:
warningCount in interface Problems
Returns:
the number of warnings; always 0 or a positive number

infoCount

public int infoCount()
Description copied from interface: Problems
Determine the number of information messages within these results.

Specified by:
infoCount in interface Problems
Returns:
the number of information messages; always 0 or a positive number

iterator

public Iterator<Problem> iterator()
Description copied from interface: Problems

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

size

public int size()
Description copied from interface: Problems
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.hasProblems(), Problems.isEmpty()

toString

public String toString()
Overrides:
toString in class Object

writeTo

public void writeTo(Logger logger)
Description copied from interface: Problems
Write the problems to the supplied logger.

Specified by:
writeTo in interface Problems
Parameters:
logger - the logger

writeTo

public void writeTo(Logger logger,
                    Problem.Status firstStatus,
                    Problem.Status... additionalStatuses)
Description copied from interface: Problems
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

ModeShape Distribution 3.0.0.Beta4

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