org.modeshape.common.collection
Class ThreadSafeProblems

java.lang.Object
  extended by org.modeshape.common.collection.AbstractProblems
      extended by org.modeshape.common.collection.ThreadSafeProblems
All Implemented Interfaces:
Serializable, Iterable<Problem>, Problems

@ThreadSafe
public class ThreadSafeProblems
extends AbstractProblems

A thread-safe Problems collection. The problems will be returned in the order in which they were encountered.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.modeshape.common.collection.AbstractProblems
EMPTY_PROBLEMS
 
Constructor Summary
ThreadSafeProblems()
           
 
Method Summary
 void addAll(Iterable<Problem> problems)
          Add all of the problems in the supplied list.
protected  void addProblem(Problem problem)
          
protected  List<Problem> getProblems()
          
 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.
 int size()
          Get the number of problems that are in this collection
 
Methods inherited from class org.modeshape.common.collection.AbstractProblems
addError, addError, addError, addError, addError, addError, addError, addError, addInfo, addInfo, addInfo, addInfo, addInfo, addInfo, addInfo, addInfo, addWarning, addWarning, addWarning, addWarning, addWarning, addWarning, addWarning, addWarning, iterator, logLevelFor, toString, writeTo, writeTo
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ThreadSafeProblems

public ThreadSafeProblems()
Method Detail

hasErrors

public boolean hasErrors()
Determine if there is at least one error in this collection.

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

hasProblems

public boolean hasProblems()
Determine if there are problems in this collection.

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

hasInfo

public boolean hasInfo()
Determine if there is at least one informational problem in this collection.

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

hasWarnings

public boolean hasWarnings()
Determine if there is at least one warning in this collection.

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

isEmpty

public boolean isEmpty()
Determine if this collection is empty.

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

size

public int size()
Get the number of problems that are in this collection

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

addProblem

protected void addProblem(Problem problem)

Specified by:
addProblem in class AbstractProblems
See Also:
AbstractProblems.addProblem(Problem)

addAll

public void addAll(Iterable<Problem> problems)
Add all of the problems in the supplied list.

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

getProblems

protected List<Problem> getProblems()

Specified by:
getProblems in class AbstractProblems
See Also:
AbstractProblems.getProblems()


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