private void buildPattern(
      PartialPath pathPattern,
      Map<String, IFATransition> transitionMap,
      AtomicInteger stateIndexGenerator) {
    // traverse pathPattern and construct NFA
    int prevIndex = 0;
    for (int i = 0; i < pathPattern.getNodeLength(); i++) {
      String node = pathPattern.getNodes()[i];
      // if it is tail node, transit to final state
      DFAState state =
          i == pathPattern.getNodeLength() - 1
              ? new DFAState(stateIndexGenerator.incrementAndGet(), true)
              : new DFAState(stateIndexGenerator.incrementAndGet());
      nfaStateList.add(state);
      for (int j = 0; j < transitionMap.size(); j++) {
        nfaTransitionTable[j][state.getIndex()] = new ArrayList<>();
      }
      // construct transition
      if (IoTDBConstant.ONE_LEVEL_PATH_WILDCARD.equals(node)) {
        for (IFATransition transition : transitionMap.values()) {
          nfaTransitionTable[transition.getIndex()][prevIndex].add(state);
        }
      } else if (IoTDBConstant.MULTI_LEVEL_PATH_WILDCARD.equals(node)) {
        for (IFATransition transition : transitionMap.values()) {
          nfaTransitionTable[transition.getIndex()][prevIndex].add(state);
          nfaTransitionTable[transition.getIndex()][state.getIndex()].add(state);
        }
      } else {
        nfaTransitionTable[transitionMap.get(node).getIndex()][prevIndex].add(state);
      }
      prevIndex = state.getIndex();
    }
  }
Construct NFA graph for given path pattern. Only used for authentication now.

@param prefixOrFullPatternTree the included PartialPath must be a prefix or a fullPath
@param transitionMap transitionMap
iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/path/fa/dfa/graph/NFAGraph.java