void add(IFAState state) {
    if (stateStatus[state.getIndex()]) {
      return;
    }
    if (end == existingState.length) {
      int[] array = new int[existingState.length * 2];
      System.arraycopy(existingState, 0, array, 0, end);
      existingState = array;
    }
    existingState[end++] = state.getIndex();
    stateStatus[state.getIndex()] = true;
  }
Construct an empty set with given capacity. This set stores states no more than given cpacity.

@param capacity generally, we use stateSize as capacity
iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/path/fa/match/MatchedStateSet.java