Class ClassificationBag<K,V>
- java.lang.Object
-
- com.vladsch.flexmark.util.collection.ClassificationBag<K,V>
-
public class ClassificationBag<K,V> extends Object
-
-
Constructor Summary
Constructors Constructor Description ClassificationBag(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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanadd(V item)@NotNull BitSetcategoriesBitSet(@NotNull Collection<? extends K> categories)@NotNull BitSetcategoriesBitSet(@NotNull K... categories)voidclear()booleancontains(V item)booleancontainsCategory(K category)intgetCategoryCount(K category)<X> @NotNull ReversibleIterable<X>getCategoryItems(@NotNull Class<? extends X> xClass, @NotNull BitSet bitSet)<X> @NotNull ReversibleIterable<X>getCategoryItems(@NotNull Class<? extends X> xClass, @NotNull Collection<? extends K> categories)<X> @NotNull ReversibleIterable<X>getCategoryItems(@NotNull Class<? extends X> xClass, @NotNull K... categories)<X> @NotNull ReversibleIterable<X>getCategoryItemsReversed(@NotNull Class<? extends X> xClass, @NotNull BitSet bitSet)<X> @NotNull ReversibleIterable<X>getCategoryItemsReversed(@NotNull Class<? extends X> xClass, @NotNull Collection<? extends K> categories)<X> @NotNull ReversibleIterable<X>getCategoryItemsReversed(@NotNull Class<? extends X> xClass, @NotNull K... categories)@NotNull Map<K,BitSet>getCategoryMap()@Nullable BitSetgetCategorySet(K category)@NotNull OrderedSet<V>getItems()intgetModificationCount()booleanremove(int index)booleanremove(V item)
-
-
-
Constructor Detail
-
ClassificationBag
public ClassificationBag(@NotNull @NotNull Function<V,K> mapper, @Nullable @Nullable CollectionHost<V> host)
-
ClassificationBag
public ClassificationBag(int capacity, @NotNull @NotNull Function<V,K> mapper, @Nullable @Nullable CollectionHost<V> host)
-
-
Method Detail
-
getItems
@NotNull public @NotNull OrderedSet<V> getItems()
-
getModificationCount
public int getModificationCount()
-
add
public boolean add(@Nullable V item)
-
remove
public boolean remove(@Nullable V item)
-
remove
public boolean remove(int index)
-
contains
public boolean contains(@Nullable V item)
-
containsCategory
public boolean containsCategory(@Nullable K category)
-
getCategoryCount
public int getCategoryCount(@Nullable K category)
-
clear
public void clear()
-
getCategoryItems
@SafeVarargs @NotNull public final <X> @NotNull ReversibleIterable<X> getCategoryItems(@NotNull @NotNull Class<? extends X> xClass, @NotNull @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 @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
@SafeVarargs @NotNull public final @NotNull BitSet categoriesBitSet(@NotNull @NotNull K... categories)
-
categoriesBitSet
@NotNull public final @NotNull BitSet categoriesBitSet(@NotNull @NotNull Collection<? extends K> categories)
-
-