code: private Pair<Integer, AdditionalItemsLoadable> findAdditionalItems(String categoryName,
        List<FeedItem> items) {
      int size = items.size();
      for (int i = 0; i < size; i++) {
        FeedItem item = items.get(i);
        if (item instanceof AdditionalItemsLoadable
            && ((AdditionalItemsLoadable) item).getCategoryName().equals(categoryName)) {
          return Pair.create(i, (AdditionalItemsLoadable) item);
        }
      }
  
      throw new RuntimeException("No "
          + AdditionalItemsLoadable.class.getSimpleName()
          + " has been found for category = "
          + categoryName);
    }
docs: find the {@link AdditionalItemsLoadable} for the given category name
  
  @param categoryName The name of the category
  @param items the list of feeditems