<commit_before>package kotowari.data;

import enkan.collection.Multimap;
import enkan.data.Extendable;
import enkan.util.ThreadingUtils;

import java.util.List;

/**
 * @author kawasima
 */
public interface Validatable extends Extendable {
    default boolean hasErrors() {
        Multimap<String, String> errors = (Multimap<String, String>) getExtension("errors");
        if (errors != null) {
            return !errors.isEmpty();
        }
        return false;
    }

    default boolean hasErrors(String key) {
        return ThreadingUtils.some((Multimap<String, String>) getExtension("errors"),
                errors -> errors.getAll(key),
                List::isEmpty).orElse(false);
    }

    default List<String> getErrors(String key) {
        return getErrors().getAll(key);
    }

    default Multimap<String, String> getErrors() {
        return (Multimap<String, String>) getExtension("errors");
    }

    default void setErrors(Multimap<String, String> errors) {
        setExtension("errors", errors);
    }
}
<commit_msg>Fixed the problem where isEmpty method is isNotEmpty<commit_after>package kotowari.data;

import enkan.collection.Multimap;
import enkan.data.Extendable;
import enkan.util.ThreadingUtils;

import java.util.List;

/**
 * @author kawasima
 */
public interface Validatable extends Extendable {
    default boolean hasErrors() {
        Multimap<String, String> errors = (Multimap<String, String>) getExtension("errors");
        if (errors != null) {
            return !errors.isEmpty();
        }
        return false;
    }

    default boolean hasErrors(String key) {
        return ThreadingUtils.some((Multimap<String, String>) getExtension("errors"),
                errors -> errors.getAll(key),
                errors -> !errors.isEmpty()).orElse(false);
    }

    default List<String> getErrors(String key) {
        return getErrors().getAll(key);
    }

    default Multimap<String, String> getErrors() {
        return (Multimap<String, String>) getExtension("errors");
    }

    default void setErrors(Multimap<String, String> errors) {
        setExtension("errors", errors);
    }
}

{'fraction_non_alphanumeric': 0.12039197386840877, 'fraction_numerical': 0.0, 'mean_word_length': 3.0452830188679245, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 20, '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': '672282', 'n_tokens_mistral': 622, 'n_tokens_neox': 609, 'n_words': 138}