On this page

ThreadUtils.NamePredicate

@Deprecated public static class org.apache.commons.lang3.ThreadUtils.NamePredicate implements ThreadUtils.ThreadPredicate, ThreadUtils.ThreadGroupPredicate[source]

Deprecated: Use a Predicate.

Used internally, consider private.

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

Constructors

NamePredicate(String)

Constructs an instance.

public NamePredicate(String name)[source]

Constructs an instance.

Parameters:

name – thread or thread group name.

Throws:

java.lang.NullPointerException – Thrown if the name is null.

Methods

test(Thread)

Evaluates this predicate on the given thread.

test(ThreadGroup)

Evaluates this predicate on the given thread group.

@Override public boolean test(Thread thread)[source]

Evaluates this predicate on the given thread.

Parameters:

thread – The thread

Returns:

true if the thread matches the predicate, otherwise false

@Override public boolean test(ThreadGroup threadGroup)[source]

Evaluates this predicate on the given thread group.

Parameters:

threadGroup – The thread group

Returns:

true if the threadGroup matches the predicate, otherwise false