<commit_before>package jalf;

import static jalf.util.ValidationUtils.validateNotNull;

/**
 * @author amirm
 */
public class AttrName implements Comparable<AttrName> {
    public static AttrName attr(String name) {
        // TODO use a concurrent WeakHashMap to keep immutable AttrName(s)
        return new AttrName(name);
    }

    private String name;

    private AttrName(String name) {
        validateNotNull("Parameter 'name' must be non-null.", name);
        this.name = name;
    }

    public String getName() {
        return name;
    }

    @Override
    public int compareTo(AttrName o) {
        return name.compareTo(o.name);
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        AttrName attrName = (AttrName) o;

        if (!name.equals(attrName.name)) return false;

        return true;
    }

    @Override
    public int hashCode() {
        return name.hashCode();
    }
}<commit_msg>Slightly refactor AttrName and add AttrName#toString()<commit_after>package jalf;

import static jalf.util.ValidationUtils.validateNotNull;

/**
 * @author amirm
 */
public class AttrName implements Comparable<AttrName> {
    public static AttrName attr(String name) {
        // TODO use a concurrent WeakHashMap to keep immutable AttrName(s)
        return new AttrName(name);
    }

    private String name;

    private AttrName(String name) {
        validateNotNull("Parameter 'name' must be non-null.", name);
        this.name = name;
    }

    public String getName() {
        return name;
    }

    @Override
    public int compareTo(AttrName o) {
        return name.compareTo(o.name);
    }

    @Override
    public int hashCode() {
        return name.hashCode();
    }

    @Override
    public boolean equals(Object o) {
        if (this == o)
            return true;
        if (o == null || getClass() != o.getClass())
            return false;
        AttrName attrName = (AttrName) o;
        return name.equals(attrName.name);
    }

    @Override
    public String toString() {
        return name;
    }

}
{'fraction_non_alphanumeric': 0.10309754969949145, 'fraction_numerical': 0.0, 'mean_word_length': 2.3550387596899225, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '7128254', 'n_tokens_mistral': 643, 'n_tokens_neox': 623, 'n_words': 183}