Top Fields Constructors Methods
com.vladsch.flexmark.util.collection

public Class ClassificationBag<K, V>

extends Object
Class Inheritance
Imports
com.vladsch.flexmark.util.collection.iteration.BitSetIterable, .IndexedIterable, .ReversibleIterable, org.jetbrains.annotations.NotNull, .Nullable, java.util.BitSet, .Collection, .Map, java.util.function.Function

Field Summary

Modifier and TypeField and Description
pack-priv final @NotNull IndexedItemBitSetMap<K, V>
pack-priv final @Nullable CollectionHost<V>
private final @NotNull OrderedSet<V>

Constructor Summary

AccessConstructor and Description
public
public
public
ClassificationBag(int capacity, @NotNull Function<V, K> mapper)

public
ClassificationBag(int capacity, @NotNull Function<V, K> mapper, @Nullable CollectionHost<V> host)

Method Summary

Modifier and TypeMethod and Description
public boolean
add(V item)

public final @NotNull BitSet
categoriesBitSet(K... categories)

public final @NotNull BitSet
categoriesBitSet(@NotNull Collection<? extends K> categories)

public void
public boolean
contains(V item)

public boolean
containsCategory(K category)

public int
getCategoryCount(K category)

public final <X> @NotNull ReversibleIterable<X>
getCategoryItems(@NotNull Class<? extends X> xClass, K... categories)

public final <X> @NotNull ReversibleIterable<X>
getCategoryItems(@NotNull Class<? extends X> xClass, @NotNull Collection<? extends K> categories)

public final <X> @NotNull ReversibleIterable<X>
getCategoryItems(@NotNull Class<? extends X> xClass, @NotNull BitSet bitSet)

public final <X> @NotNull ReversibleIterable<X>
getCategoryItemsReversed(@NotNull Class<? extends X> xClass, K... categories)

public final <X> @NotNull ReversibleIterable<X>
getCategoryItemsReversed(@NotNull Class<? extends X> xClass, @NotNull Collection<? extends K> categories)

public final <X> @NotNull ReversibleIterable<X>
getCategoryItemsReversed(@NotNull Class<? extends X> xClass, @NotNull BitSet bitSet)

public @NotNull Map<K, BitSet>
public @Nullable BitSet
getCategorySet(K category)

public @NotNull OrderedSet<V>
public int
public boolean
remove(V item)

public boolean
remove(int index)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

bagback to summary
pack-priv final @NotNull IndexedItemBitSetMap<K, V> bag
Annotations
@NotNull
hostback to summary
pack-priv final @Nullable CollectionHost<V> host
Annotations
@Nullable
itemsback to summary
private final @NotNull OrderedSet<V> items
Annotations
@NotNull

Constructor Detail

ClassificationBagback to summary
public ClassificationBag(Function<V, K> mapper)
ClassificationBagback to summary
public ClassificationBag(@NotNull Function<V, K> mapper, @Nullable CollectionHost<V> host)
ClassificationBagback to summary
public ClassificationBag(int capacity, @NotNull Function<V, K> mapper)
ClassificationBagback to summary
public ClassificationBag(int capacity, @NotNull Function<V, K> mapper, @Nullable CollectionHost<V> host)

Method Detail

addback to summary
public boolean add(V item)
categoriesBitSetback to summary
public final @NotNull BitSet categoriesBitSet(K... categories)
Annotations
@SafeVarargs
@SuppressWarnings:WeakerAccess
@NotNull
categoriesBitSetback to summary
public final @NotNull BitSet categoriesBitSet(@NotNull Collection<? extends K> categories)
Annotations
@NotNull
clearback to summary
public void clear()
containsback to summary
public boolean contains(V item)
containsCategoryback to summary
public boolean containsCategory(K category)
getCategoryCountback to summary
public int getCategoryCount(K category)
Annotations
@SuppressWarnings:WeakerAccess
getCategoryItemsback to summary
public final <X> @NotNull ReversibleIterable<X> getCategoryItems(@NotNull Class<? extends X> xClass, K... categories)
Annotations
@SafeVarargs
@NotNull
getCategoryItemsback to summary
public final <X> @NotNull ReversibleIterable<X> getCategoryItems(@NotNull Class<? extends X> xClass, @NotNull Collection<? extends K> categories)
Annotations
@NotNull
getCategoryItemsback to summary
public final <X> @NotNull ReversibleIterable<X> getCategoryItems(@NotNull Class<? extends X> xClass, @NotNull BitSet bitSet)
Annotations
@NotNull
getCategoryItemsReversedback to summary
public final <X> @NotNull ReversibleIterable<X> getCategoryItemsReversed(@NotNull Class<? extends X> xClass, K... categories)
Annotations
@SafeVarargs
@NotNull
getCategoryItemsReversedback to summary
public final <X> @NotNull ReversibleIterable<X> getCategoryItemsReversed(@NotNull Class<? extends X> xClass, @NotNull Collection<? extends K> categories)
Annotations
@NotNull
getCategoryItemsReversedback to summary
public final <X> @NotNull ReversibleIterable<X> getCategoryItemsReversed(@NotNull Class<? extends X> xClass, @NotNull BitSet bitSet)
Annotations
@NotNull
getCategoryMapback to summary
public @NotNull Map<K, BitSet> getCategoryMap()
Annotations
@NotNull
getCategorySetback to summary
public @Nullable BitSet getCategorySet(K category)
Annotations
@Nullable
getItemsback to summary
public @NotNull OrderedSet<V> getItems()
Annotations
@NotNull
getModificationCountback to summary
public int getModificationCount()
Annotations
@SuppressWarnings:WeakerAccess
removeback to summary
public boolean remove(V item)
removeback to summary
public boolean remove(int index)