org.modeshape.common.collection

## Class ThreadSafeProblems

- java.lang.Object
- - org.modeshape.common.collection.AbstractProblems
  - - 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

    Constructors
    Constructor and Description
    `ThreadSafeProblems()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `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, errorCount, infoCount, iterator, logLevelFor, problemCount, toString, warningCount, 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()

      Description copied from interface: `Problems`
      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

    - #### hasProblems

          public boolean hasProblems()

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

    - #### 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`
      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

    - #### 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`
      Overrides:
        `hasWarnings` in class `AbstractProblems`
      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`
      Overrides:
        `isEmpty` in class `AbstractProblems`
      Returns:
        true if the there are no problems, or false if there is at least one
      See Also:
        `Problems.hasProblems()`, `Problems.size()`

    - #### 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`
      Overrides:
        `size` in class `AbstractProblems`
      Returns:
        the number of problems; never negative
      See Also:
        `Problems.hasProblems()`, `Problems.isEmpty()`

    - #### addProblem

          protected void addProblem(Problem problem)

      Specified by:
        `addProblem` in class `AbstractProblems`

    - #### addAll

          public void addAll(Iterable<Problem> problems)

      Description copied from interface: `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

    - #### getProblems

          protected List<Problem> getProblems()

      Specified by:
        `getProblems` in class `AbstractProblems`

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