docs: private void add(State[] stack, State state) {
  
          if (stackElements != 0) {
              System.arraycopy(stack, 0, stack, 1, stackElements);
          }
  
          stack[0] = state;
          stackElements++;
      }