<commit_before>package me.benjozork.onyx.utils;

public class Maybe<T> {

    private final T value;

    private Maybe(T value) {
        this.value = value;
    }

    public static <T> Maybe<T> empty() {
        return new Maybe<T>(null);
    }

    public static <T> Maybe<T> of(T value) {
        if (value == null)
            throw new NullPointerException("value may not be null! use Maybe.empty() or Maybe.unsure(value) instead");
        return new Maybe<T>(value);
    }

    public static <T> Maybe<T> unsure(T value) {
        return new Maybe<T>(value);
    }

    public T get() {
        return value;
    }

    public boolean exists() {
        return value != null;
    }

}
<commit_msg>Maybe docs<commit_after>package me.benjozork.onyx.utils;

/**
 * Represents an object that may or may not exist
 * @param <T> the type of the object
 * @author angelickite
 */
public class Maybe<T> {

    private final T value;

    private Maybe(T value) {
        this.value = value;
    }

    /**
     * Returns an empty {@link Maybe}
     * @param <T> the type of the object
     */
    public static <T> Maybe<T> empty() {
        return new Maybe<T>(null);
    }

    /**
     * Returns a {@link Maybe} containing a corresponding object
     * @param value the contained object
     */
    public static <T> Maybe<T> of(T value) {
        if (value == null)
            throw new NullPointerException("value may not be null! use Maybe.empty() or Maybe.unsure(value) instead");
        return new Maybe<T>(value);
    }

    /**
     * Returns a {@link Maybe} that may or may not contain an object
     * @param value the contained object
     */
    public static <T> Maybe<T> unsure(T value) {
        return new Maybe<T>(value);
    }

    public T get() {
        return value;
    }

    /**
     * Checks whether the {@link Maybe} contains an object
     */
    public boolean exists() {
        return value != null;
    }

}

{'fraction_non_alphanumeric': 0.11722365038560412, 'fraction_numerical': 0.0, 'mean_word_length': 2.1849427168576105, 'pattern_counts': {'":': 0, '<': 25, '<?xml version=': 0, '>': 25, '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': '663500', 'n_tokens_mistral': 597, 'n_tokens_neox': 579, 'n_words': 201}