code: void addState(State<S, L> state) {
          ElementReference ref = states.referencedAdd(state);
          state.setBlockReference(ref);
          state.setBlock(this);
      }
docs: Adds a state to this block.
  
  @param state
  the state to add.