<commit_before>/*
 * Copyright <NAME> 2009-2011, All rights reserved.
 *
 */

package net.domesdaybook.automata;

import net.domesdaybook.object.copy.DeepCopy;
import java.util.List;
import java.util.Map;

/**
 * State is an interface representing a state of an automata.
 * A state can have a label, transitions to other states (or to itself),
 * and be a final or non-final state.  A final state is one which indicates
 * a match if it is reached processing the automata.
 * 
 * It extends the {@link DeepCopy} interface, to ensure that all states
 * can provide deep copies of themselves.
 *
 * @author <NAME>
 */
public interface State extends DeepCopy {

    //FIXME: replace these with an enum and wherever they are currently used.
    public static boolean FINAL = true;
    public static boolean NON_FINAL = false;


    /**
     *
     * @return The label of the state.
     */
    public String getLabel();


    /**
     *
     * @param label The label to give the state.
     */
    public void setLabel(final String label);


    /**
     *
     * @param transition A transition to add to this state.
     */
    public void addTransition(final Transition transition);


    /**
     *
     * @param transitions A list of transitions to add to this state.
     */
    public void addAllTransitions(final List<Transition> transitions);


    /**
     *
     * @return A list of transitions from this state.
     */
    public List<Transition> getTransitions();


    /**
     *
     * @return true if this state is a final state.
     */
    public boolean isFinal();



    /**
     * This is a convenience method, providing initial values to:
     * <CODE>deepCopy(Map<DeepCopy, DeepCopy> oldToNewObjects)</CODE>
     *
     * @return State a deep copy of this object.
     */
    public State deepCopy();


    /**
     * This method is inherited from the <CODE>DeepCopy</COPY> interface,
     * and is redeclared here with a return type of State (rather than DeepCopy),
     * to make using the method easier.
     *
     * @param oldToNewObjects
     * @return State
     */
    public State deepCopy(Map<DeepCopy, DeepCopy> oldToNewObjects);

}

<commit_msg>tiny tweaks.<commit_after>/*
 * Copyright <NAME> 2009-2011, All rights reserved.
 *
 */

package net.domesdaybook.automata;

import net.domesdaybook.object.copy.DeepCopy;
import java.util.List;
import java.util.Map;

/**
 * State is an interface representing a state of an automata.
 * A state can have a label, transitions to other states (or to itself),
 * and be a final or non-final state.  A final state is one which indicates
 * a match if it is reached processing the automata.
 * 
 * It extends the {@link DeepCopy} interface, to ensure that all states
 * can provide deep copies of themselves.
 *
 * @author <NAME>
 */
public interface State extends DeepCopy {

    //FIXME: replace these with an enum and wherever they are currently used.
    public static boolean FINAL = true;
    public static boolean NON_FINAL = false;


    /**
     *
     * @return The label of the state.
     */
    public String getLabel();


    /**
     *
     * @param label The label to give the state.
     */
    public void setLabel(final String label);


    /**
     *
     * @param transition A transition to add to this state.
     */
    public void addTransition(final Transition transition);


    /**
     *
     * @param transitions A list of transitions to add to this state.
     */
    public void addAllTransitions(final List<Transition> transitions);


    /**
     *
     * @return A list of transitions from this state.
     */
    public List<Transition> getTransitions();


    /**
     *
     * @return true if this state is a final state.
     */
    public boolean isFinal();


    /**
     * This is a convenience method, providing initial values to:
     * <CODE>deepCopy(Map<DeepCopy, DeepCopy> oldToNewObjects)</CODE>
     *
     * @return State a deep copy of this object.
     */
    public State deepCopy();


    /**
     * This method is inherited from the <CODE>DeepCopy</COPY> interface,
     * and is redeclared here with a return type of State (rather than DeepCopy),
     * to make using the method easier.
     *
     * @param oldToNewObjects
     * @return State
     */
    public State deepCopy(Map<DeepCopy, DeepCopy> oldToNewObjects);

}


{'fraction_non_alphanumeric': 0.09172413793103448, 'fraction_numerical': 0.0036781609195402297, 'mean_word_length': 2.554738562091503, 'pattern_counts': {'":': 0, '<': 23, '<?xml version=': 0, '>': 23, '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': '1676886', 'n_tokens_mistral': 1248, 'n_tokens_neox': 1185, 'n_words': 483}