code: public <T extends Serializable> T getStateObject(final Class<T> stateObjectClass) {
          return (T) stateObjects.get(stateObjectClass);
      }
docs: Returns the state object specified by its class.
  
  @param <T>              the type of the state object
  @param stateObjectClass the runtime class of the state object
  
  @return the state object specified by its class