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 name)

Constructs an instance.

public NamePredicate(String name)[source]

Constructs an instance.

Parameters:

name – thread or thread group name.

Throws:

NullPointerException – Thrown if the name is null.

Methods

boolean

test(Thread thread)

Evaluates this predicate on the given thread.

boolean

test(ThreadGroup threadGroup)

Evaluates this predicate on the given thread group.

public boolean test(Thread thread)[source]

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

public boolean test(ThreadGroup threadGroup)[source]

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