<commit_before>package com.dhemery.express;

import java.util.function.BooleanSupplier;
import java.util.function.Function;
import java.util.function.Predicate;

/**
 * An object with a fixed name. The {@code toString()} method returns the fixed
 * name.
 */
public class Named {
    private final String name;

    /**
     * Create an object with the given name.
     */
    public Named(String name) {
        this.name = name;
    }

    /**
     * Return this object's name
     */
    @Override
    public String toString() {
        return name;
    }

    /**
     * Create a {@link BooleanSupplier} with the given name and underlying
     * supplier.
     */
    public static BooleanSupplier condition(String name, BooleanSupplier condition) {
        return new NamedBooleanSupplier(name, condition);
    }

    /**
     * Create a {@link Function} with the given name and underlying function.
     *
     * @see NamedFunction
     */
    public static <T, R> Function<T, R> function(String description, Function<? super T, ? extends R> function) {
        return new NamedFunction<>(description, function);
    }

    /**
     * Create a {@link Predicate} with the given name and underlying predicate.
     *
     * @see NamedDiagnosingPredicate
     */
    public static <T> Predicate<T> predicate(String description, Predicate<? super T> predicate) {<commit_msg>Fix generic wildcarding in Named.<commit_after>package com.dhemery.express;

import java.util.function.BooleanSupplier;
import java.util.function.Function;
import java.util.function.Predicate;

/**
 * An object with a fixed name. The {@code toString()} method returns the fixed
 * name.
 */
public class Named {
    private final String name;

    /**
     * Create an object with the given name.
     */
    public Named(String name) {
        this.name = name;
    }

    /**
     * Return this object's name
     */
    @Override
    public String toString() {
        return name;
    }

    /**
     * Create a {@link BooleanSupplier} with the given name and underlying
     * supplier.
     */
    public static BooleanSupplier condition(String name, BooleanSupplier condition) {
        return new NamedBooleanSupplier(name, condition);
    }

    /**
     * Create a {@link Function} with the given name and underlying function.
     *
     * @see NamedFunction
     */
    public static <T, R> Function<T, R> function(String description, Function<T, R> function) {
        return new NamedFunction<>(description, function);
    }

    /**
     * Create a {@link Predicate} with the given name and underlying predicate.
     *
     * @see NamedDiagnosingPredicate
     */
    public static <T> Predicate<T> predicate(String description, Predicate<T> predicate) {
{'fraction_non_alphanumeric': 0.101238164603059, 'fraction_numerical': 0.0, 'mean_word_length': 2.6823056300268098, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7381997', 'n_tokens_mistral': 766, 'n_tokens_neox': 751, 'n_words': 253}