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

  Deprecated.
  Use a `Predicate`.

      @Deprecated
      public static class ThreadUtils.NamePredicate
      extends Object
      implements ThreadUtils.ThreadPredicate, ThreadUtils.ThreadGroupPredicate

  Used internally, consider private.

  A predicate implementation which matches a thread or thread group name.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `NamePredicate(String name)` Deprecated. Constructs an instance.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `test(Thread thread)` Deprecated. Evaluates this predicate on the given thread.
    `boolean` | `test(ThreadGroup threadGroup)` Deprecated. Evaluates this predicate on the given thread group.

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

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

- - ### Constructor Detail

    - #### NamePredicate

          public NamePredicate(String name)

      Deprecated.
      Constructs an instance.
      Parameters:
        `name` - thread or thread group name
      Throws:
        `NullPointerException` - if the name is `null`

  - ### Method Detail

    - #### test

          public boolean test(Thread thread)

      Deprecated.
      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`

    - #### test

          public boolean test(ThreadGroup threadGroup)

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

Copyright © 2001–2023 The Apache Software Foundation. All rights reserved.