public FSA complete() {
    add(new byte[0], 0, 0);

    if (nextArcOffset[0] - activePath[0] == 0) {
      // An empty FSA.
      setArcTarget(epsilon, TERMINAL_STATE);
    } else {
      // An automaton with at least a single arc from root.
      root = freezeState(0);
      setArcTarget(epsilon, root);
    }

    info = new TreeMap<InfoEntry, Object>();
    info.put(InfoEntry.SERIALIZATION_BUFFER_SIZE, serialized.length);
    info.put(InfoEntry.SERIALIZATION_BUFFER_REALLOCATIONS, serializationBufferReallocations);
    info.put(InfoEntry.CONSTANT_ARC_AUTOMATON_SIZE, size);
    info.put(InfoEntry.MAX_ACTIVE_PATH_LENGTH, activePath.length);
    info.put(InfoEntry.STATE_REGISTRY_TABLE_SLOTS, hashSet.length);
    info.put(InfoEntry.STATE_REGISTRY_SIZE, hashSize);
    info.put(InfoEntry.ESTIMATED_MEMORY_CONSUMPTION_MB, 
        (this.serialized.length + this.hashSet.length * 4) / (double) MB);

    final FSA fsa = new ConstantArcSizeFSA(java.util.Arrays.copyOf(this.serialized, this.size), epsilon);
    this.serialized = null;
    this.hashSet = null;
    return fsa;
  }
public FSA complete ( ) { add ( new byte [ 0 ] , 0 , 0 ) ; if ( nextArcOffset [ 0 ] - activePath [ 0 ] == 0 ) { setArcTarget ( epsilon , TERMINAL_STATE ) ; } else { root = freezeState ( 0 ) ; setArcTarget ( epsilon , root ) ; } info = new TreeMap < InfoEntry , Object > ( ) ; info . put ( InfoEntry . SERIALIZATION_BUFFER_SIZE , serialized . length ) ; info . put ( InfoEntry . SERIALIZATION_BUFFER_REALLOCATIONS , serializationBufferReallocations ) ; info . put ( InfoEntry . CONSTANT_ARC_AUTOMATON_SIZE , size ) ; info . put ( InfoEntry . MAX_ACTIVE_PATH_LENGTH , activePath . length ) ; info . put ( InfoEntry . STATE_REGISTRY_TABLE_SLOTS , hashSet . length ) ; info . put ( InfoEntry . STATE_REGISTRY_SIZE , hashSize ) ; info . put ( InfoEntry . ESTIMATED_MEMORY_CONSUMPTION_MB , ( this . serialized . length + this . hashSet . length * 4 ) / ( double ) MB ) ; final FSA fsa = new ConstantArcSizeFSA ( java . util . Arrays . copyOf ( this . serialized , this . size ) , epsilon ) ; this . serialized = null ; this . hashSet = null ; return fsa ; }
@return Finalizes the construction of the automaton and returns it.