code: @SuppressWarnings("unchecked")
      public <T> MenuState<T> getMenuState(MenuItem<T> item) {
          return (MenuState<T>) menuStates.get(item.getId());
      }
docs: Gets the menu state that's associated with a given menu item. This is the
  current value for the menu item.
  @param item the item which the state belongs to
  @param <T> determined automatically
  @return the state for the given menu item