<commit_before>package edu.uabc.ai.search;

public class State {
    public final Object value;

    public State(Object value) {
        if (value == null) 
            throw new RuntimeException("State value cannot be null");

        this.value = value;
    }
    
    @Override
    public String toString() {
        return String.format("S(%s)", this.value.toString());
    }

    @Override
    public boolean equals(Object o) {
        if (o == null || !(o instanceof State))
            return false;

        return this.value.equals(((State)o).value);
    }
}<commit_msg>Add convenience functions to the State class<commit_after>package edu.uabc.ai.search;

public class State {
    public final Object value;

    public State(Object value) {
        if (value == null) 
            throw new RuntimeException("State value cannot be null");

        this.value = value;
    }
    
    @Override
    public String toString() {
        return String.format("S(%s)", this.value.toString());
    }

    @Override
    public boolean equals(Object o) {
        if (o == null || !(o instanceof State))
            return false;

        return this.value.equals(((State)o).value);
    }

    /**
     *  Convenience function to create states.
     *  @param v The value of the state
     *  @param The created state
     */
    public static State S(Object v) {
        return new State(v);
    }

    /**
     * Convenience function to create a set of states.
     *
     * @param vs The values of each state.
     * @return An array containing the created states.
     */
    public static State[] States(Object ... vs) {
        State ss[]= new State[vs.length];
        for(int i= 0; i<vs.length; i++)
            ss[i]= new State(vs[i]);
                
        return ss;
    }
}
{'fraction_non_alphanumeric': 0.11514812744550028, 'fraction_numerical': 0.0005589714924538849, 'mean_word_length': 2.0236486486486487, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 3, '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': '3423410', 'n_tokens_mistral': 510, 'n_tokens_neox': 499, 'n_words': 165}