private static @NotNull <T, ModelType extends ListModel<T>> ListModelExtension<T, ModelType> getExtension(@NotNull ModelType model) {
    if (model instanceof DefaultListModel) return DEFAULT_MODEL;
    if (model instanceof SortedListModel) return SORTED_MODEL;
    if (model instanceof FilteringListModel) return FILTERED_MODEL;
    if (model instanceof CollectionListModel) return COLLECTION_MODEL;
    throw new AssertionError("Unknown model class: " + model.getClass().getName());
  }
private static @NotNull <T, ModelType extends ListModel<T>> ListModelExtension<T, ModelType> getExtension(@NotNull ModelType model)