src/main/java/de/dfki/lt/loot/fsa/FiniteAutomaton.java
public SubAutomaton kleene(SubAutomaton sub) {
    // create new initial and final states
    int newInitialState = this.newVertex();
    int newFinalState = this.newVertex();
    // connect new initial and final state with an epsilon transition
    this.newEdge(EPSILON, newInitialState, newFinalState);
    // connect the old final and initial state with an epsilon transition
    this.newEdge(EPSILON, sub.getFinalState(),
        sub.getInitialState());
    // connect the new states to the former initial and final state
    this.newEdge(EPSILON, newInitialState, sub.getInitialState());
    this.newEdge(EPSILON, sub.getFinalState(), newFinalState);
    // update initial state and final state
    sub.setInitialState(newInitialState);
    sub.setFinalState(newFinalState);
    return sub;
  }
/**
   * This modifies the automaton in a way that it matches an arbitrary
   * number (including zero) of the of char sequences it matches now.
   *
   * @param this the <code>FiniteAutomaton</code> to wrap with a
   * kleene star
   */
This modifies the automaton in a way that it matches an arbitrary
number (including zero) of the of char sequences it matches now.

@param this the FiniteAutomaton to wrap with a
kleene star
This modifies the automaton in a way that it matches an arbitrary number ( including zero ) of the of char sequences it matches now . @param this the FiniteAutomaton to wrap with a kleene star
public SubAutomaton kleene(SubAutomaton sub) {
    int newInitialState = this.newVertex();
    int newFinalState = this.newVertex();
    this.newEdge(EPSILON, newInitialState, newFinalState);
    this.newEdge(EPSILON, sub.getFinalState(),
        sub.getInitialState());
    this.newEdge(EPSILON, newInitialState, sub.getInitialState());
    this.newEdge(EPSILON, sub.getFinalState(), newFinalState);
    sub.setInitialState(newInitialState);
    sub.setFinalState(newFinalState);
    return sub;
  }
public SubAutomaton kleene ( SubAutomaton sub ) { int newInitialState = this . newVertex ( ) ; int newFinalState = this . newVertex ( ) ; this . newEdge ( EPSILON , newInitialState , newFinalState ) ; this . newEdge ( EPSILON , sub . getFinalState ( ) , sub . getInitialState ( ) ) ; this . newEdge ( EPSILON , newInitialState , sub . getInitialState ( ) ) ; this . newEdge ( EPSILON , sub . getFinalState ( ) , newFinalState ) ; sub . setInitialState ( newInitialState ) ; sub . setFinalState ( newFinalState ) ; return sub ; }
This modifies the automaton in a way that it matches an arbitrary
 number (including zero) of the of char sequences it matches now.
This modifies the automaton in a way that it matches an arbitrary number ( including zero ) of the of char sequences it matches now .
// create new initial and final states // connect new initial and final state with an epsilon transition // connect the old final and initial state with an epsilon transition // connect the new states to the former initial and final state // update initial state and final state