Class ClassificationBag<K,V>
java.lang.Object
com.vladsch.flexmark.util.collection.ClassificationBag<K,V>
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) final @NotNull IndexedItemBitSetMap<K, V> (package private) final @Nullable CollectionHost<V> private final @NotNull OrderedSet<V> -
Constructor Summary
ConstructorsConstructorDescriptionClassificationBag(int capacity, @NotNull Function<V, K> mapper) ClassificationBag(int capacity, @NotNull Function<V, K> mapper, @Nullable CollectionHost<V> host) ClassificationBag(@NotNull Function<V, K> mapper, @Nullable CollectionHost<V> host) ClassificationBag(Function<V, K> mapper) -
Method Summary
Modifier and TypeMethodDescriptionbooleanfinal @NotNull BitSetcategoriesBitSet(@NotNull Collection<? extends K> categories) final @NotNull BitSetcategoriesBitSet(K... categories) voidclear()booleanbooleancontainsCategory(K category) intgetCategoryCount(K category) final <X> @NotNull ReversibleIterable<X> getCategoryItems(@NotNull Class<? extends X> xClass, @NotNull BitSet bitSet) final <X> @NotNull ReversibleIterable<X> getCategoryItems(@NotNull Class<? extends X> xClass, @NotNull Collection<? extends K> categories) final <X> @NotNull ReversibleIterable<X> getCategoryItems(@NotNull Class<? extends X> xClass, K... categories) final <X> @NotNull ReversibleIterable<X> getCategoryItemsReversed(@NotNull Class<? extends X> xClass, @NotNull BitSet bitSet) final <X> @NotNull ReversibleIterable<X> getCategoryItemsReversed(@NotNull Class<? extends X> xClass, @NotNull Collection<? extends K> categories) final <X> @NotNull ReversibleIterable<X> getCategoryItemsReversed(@NotNull Class<? extends X> xClass, K... categories) @Nullable BitSetgetCategorySet(K category) @NotNull OrderedSet<V> getItems()intbooleanremove(int index) boolean
-
Field Details
-
items
-
bag
-
host
-
-
Constructor Details
-
ClassificationBag
-
ClassificationBag
public ClassificationBag(@NotNull @NotNull Function<V, K> mapper, @Nullable @Nullable CollectionHost<V> host) -
ClassificationBag
-
ClassificationBag
public ClassificationBag(int capacity, @NotNull @NotNull Function<V, K> mapper, @Nullable @Nullable CollectionHost<V> host)
-
-
Method Details
-
getItems
-
getModificationCount
public int getModificationCount() -
add
-
remove
-
remove
public boolean remove(int index) -
contains
-
containsCategory
-
getCategorySet
-
getCategoryCount
-
getCategoryMap
-
clear
public void clear() -
getCategoryItems
@SafeVarargs @NotNull public final <X> @NotNull ReversibleIterable<X> getCategoryItems(@NotNull @NotNull Class<? extends X> xClass, @NotNull K... categories) -
getCategoryItems
@NotNull public final <X> @NotNull ReversibleIterable<X> getCategoryItems(@NotNull @NotNull Class<? extends X> xClass, @NotNull @NotNull Collection<? extends K> categories) -
getCategoryItems
@NotNull public final <X> @NotNull ReversibleIterable<X> getCategoryItems(@NotNull @NotNull Class<? extends X> xClass, @NotNull @NotNull BitSet bitSet) -
getCategoryItemsReversed
@SafeVarargs @NotNull public final <X> @NotNull ReversibleIterable<X> getCategoryItemsReversed(@NotNull @NotNull Class<? extends X> xClass, @NotNull K... categories) -
getCategoryItemsReversed
@NotNull public final <X> @NotNull ReversibleIterable<X> getCategoryItemsReversed(@NotNull @NotNull Class<? extends X> xClass, @NotNull @NotNull Collection<? extends K> categories) -
getCategoryItemsReversed
@NotNull public final <X> @NotNull ReversibleIterable<X> getCategoryItemsReversed(@NotNull @NotNull Class<? extends X> xClass, @NotNull @NotNull BitSet bitSet) -
categoriesBitSet
-
categoriesBitSet
@NotNull public final @NotNull BitSet categoriesBitSet(@NotNull @NotNull Collection<? extends K> categories)
-