private static @NotNull <T> List<T> copyItemsFromModel(@NotNull ListModel<T> model) {
    ArrayList<T> items = new ArrayList<>(model.getSize());
    for (int i = 0, size = model.getSize(); i < size; i++) {
      items.add(model.getElementAt(i));
    }
    return items;
  }
private static @NotNull <T> List<T> copyItemsFromModel(@NotNull ListModel<T> model)