ThreadUtils.NamePredicate
Date: 2017-02-08

org.apache.commons.lang3

## Class ThreadUtils.NamePredicate

- java.lang.Object
- - org.apache.commons.lang3.ThreadUtils.NamePredicate

- All Implemented Interfaces:
    ThreadUtils.ThreadGroupPredicate, ThreadUtils.ThreadPredicate
  Enclosing class:
    ThreadUtils

      public static class ThreadUtils.NamePredicate
      extends java.lang.Object
      implements ThreadUtils.ThreadPredicate, ThreadUtils.ThreadGroupPredicate

  A predicate implementation which matches a thread or threadgroup name.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ThreadUtils.NamePredicate(java.lang.String name)` Predicate constructor

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `test(java.lang.Thread thread)` Evaluates this predicate on the given thread.
    `boolean` | `test(java.lang.ThreadGroup threadGroup)` Evaluates this predicate on the given threadgroup.

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

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### ThreadUtils.NamePredicate

          public ThreadUtils.NamePredicate(java.lang.String name)

      Predicate constructor
      Parameters:
        `name` - thread or threadgroup name
      Throws:
        `java.lang.IllegalArgumentException` - if the name is `null`

  - ### Method Detail

    - #### test

          public boolean test(java.lang.ThreadGroup threadGroup)

      Description copied from interface: `ThreadUtils.ThreadGroupPredicate`
      Evaluates this predicate on the given threadgroup.
      Specified by:
        `test` in interface `ThreadUtils.ThreadGroupPredicate`
      Parameters:
        `threadGroup` - the threadgroup
      Returns:
        `true` if the threadGroup matches the predicate, otherwise `false`

    - #### test

          public boolean test(java.lang.Thread thread)

      Description copied from interface: `ThreadUtils.ThreadPredicate`
      Evaluates this predicate on the given thread.
      Specified by:
        `test` in interface `ThreadUtils.ThreadPredicate`
      Parameters:
        `thread` - the thread
      Returns:
        `true` if the thread matches the predicate, otherwise `false`