public static @Nonnull Predicate nameContains(final @Nonnull String pattern) {
        return new Predicate() {
            @Override
            public boolean isValid(@Nonnull ProcessThread<?, ?, ?> thread) {
                return thread.getName().contains(pattern);
            }
        };
    }
public static @ Nonnull Predicate nameContains ( final @ Nonnull String pattern ) { return new Predicate ( ) { @ Override public boolean isValid ( @ Nonnull ProcessThread < ? , ? , ? > thread ) { return thread . getName ( ) . contains ( pattern ) ; } } ; }
Match thread its name contains string.