<commit_before>package hdm.pk070.jscheme.obj;

import java.util.Objects;

/**
 * @author patrick.kleindienst
 */
public abstract class SchemeObject {


    protected SchemeObject() {

    }


    public final <T extends SchemeObject> boolean typeOf(Class<T> clazz) {
        if (Objects.nonNull(clazz)) {
            return this.getClass().equals(clazz);
        }
        throw new IllegalArgumentException("Parameter 'clazz' must not be null.");
    }

    public abstract Object getValue();

    @Override
    public boolean equals(Object obj) {
        if (Objects.isNull(obj)) {
            return false;
        } else if (!(obj instanceof SchemeObject)) {
            return false;
        } else if (obj.getClass() != this.getClass()) {
            return false;
        } else {
            return ((SchemeObject) obj).getValue().equals(this.getValue());
        }
    }
}<commit_msg>Overwrote hashcode method and complemented missing reference comparison in equals method<commit_after>package hdm.pk070.jscheme.obj;

import java.util.Objects;

/**
 * @author patrick.kleindienst
 */
public abstract class SchemeObject {


    protected SchemeObject() {

    }


    public final <T extends SchemeObject> boolean typeOf(Class<T> clazz) {
        if (Objects.nonNull(clazz)) {
            return this.getClass().equals(clazz);
        }
        throw new IllegalArgumentException("Parameter 'clazz' must not be null.");
    }

    public abstract Object getValue();

    @Override
    public boolean equals(Object obj) {
        if (Objects.isNull(obj)) {
            return false;
        } else if (this == obj) {
            return true;
        } else if (!(obj instanceof SchemeObject)) {
            return false;
        } else if (obj.getClass() != this.getClass()) {
            return false;
        } else {
            return ((SchemeObject) obj).getValue().equals(this.getValue());
        }
    }

    @Override
    public int hashCode() {
        return this.getValue().hashCode();
    }
}
{'fraction_non_alphanumeric': 0.11580516898608349, 'fraction_numerical': 0.002982107355864811, 'mean_word_length': 2.316309719934102, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '3627891', 'n_tokens_mistral': 561, 'n_tokens_neox': 538, 'n_words': 146}