code: private State createSuffix(Word<? extends I> suffix, boolean accepting) {
          State last;
          Acceptance intermediate;
          if (!accepting) {
              if (sink == null) {
                  sink = new State(null);
              }
              last = sink;
              intermediate = Acceptance.DONT_KNOW;
          } else {
              StateSignature sig = new StateSignature(alphabetSize, Acceptance.TRUE);
              last = replaceOrRegister(sig);
              intermediate = Acceptance.TRUE;
          }
  
          int len = suffix.length();
          for (int i = len - 1; i >= 0; i--) {
              StateSignature sig = new StateSignature(alphabetSize, intermediate);
              I sym = suffix.getSymbol(i);
              int idx = inputAlphabet.getSymbolIndex(sym);
              sig.successors.array[idx] = last;
              last = replaceOrRegister(sig);
          }
  
          return last;
      }
docs: Creates a suffix state sequence, i.e., a linear sequence of states connected by transitions labeled by the
  letters of the given suffix word.
  
  @param suffix
  the suffix word
  @param accepting
  whether or not the final state should be accepting
  
  @return the first state in the sequence