public @NotNull List<T> getItems() {
    int count = list.getItemsCount();
    List<T> result = new ArrayList<>(count);
    for (int i = 0; i < count; i++) {
      T item = list.getItemAt(i);
      if (item != null) {
        result.add(item);
      }
    }
    return result;
  }
public @NotNull List<T> getItems()