Class ClassificationBag<K,​V>


  • public class ClassificationBag<K,​V>
    extends java.lang.Object
    • Constructor Detail

      • ClassificationBag

        public ClassificationBag​(java.util.function.Function<V,​K> mapper)
      • ClassificationBag

        public ClassificationBag​(@NotNull
                                 @NotNull java.util.function.Function<V,​K> mapper,
                                 @Nullable
                                 @Nullable CollectionHost<V> host)
      • ClassificationBag

        public ClassificationBag​(int capacity,
                                 @NotNull
                                 @NotNull java.util.function.Function<V,​K> mapper)
      • ClassificationBag

        public ClassificationBag​(int capacity,
                                 @NotNull
                                 @NotNull java.util.function.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)
      • getCategorySet

        @Nullable
        public @Nullable java.util.BitSet getCategorySet​(@Nullable
                                                         K category)
      • getCategoryCount

        public int getCategoryCount​(@Nullable
                                    K category)
      • getCategoryMap

        @NotNull
        public @NotNull java.util.Map<K,​java.util.BitSet> getCategoryMap()
      • clear

        public void clear()
      • getCategoryItems

        @SafeVarargs
        @NotNull
        public final <X> @NotNull ReversibleIterable<X> getCategoryItems​(@NotNull
                                                                         @NotNull java.lang.Class<? extends X> xClass,
                                                                         @NotNull
                                                                         @NotNull K... categories)
      • getCategoryItems

        @NotNull
        public final <X> @NotNull ReversibleIterable<X> getCategoryItems​(@NotNull
                                                                         @NotNull java.lang.Class<? extends X> xClass,
                                                                         @NotNull
                                                                         @NotNull java.util.Collection<? extends K> categories)
      • getCategoryItems

        @NotNull
        public final <X> @NotNull ReversibleIterable<X> getCategoryItems​(@NotNull
                                                                         @NotNull java.lang.Class<? extends X> xClass,
                                                                         @NotNull
                                                                         @NotNull java.util.BitSet bitSet)
      • getCategoryItemsReversed

        @SafeVarargs
        @NotNull
        public final <X> @NotNull ReversibleIterable<X> getCategoryItemsReversed​(@NotNull
                                                                                 @NotNull java.lang.Class<? extends X> xClass,
                                                                                 @NotNull
                                                                                 @NotNull K... categories)
      • getCategoryItemsReversed

        @NotNull
        public final <X> @NotNull ReversibleIterable<X> getCategoryItemsReversed​(@NotNull
                                                                                 @NotNull java.lang.Class<? extends X> xClass,
                                                                                 @NotNull
                                                                                 @NotNull java.util.Collection<? extends K> categories)
      • getCategoryItemsReversed

        @NotNull
        public final <X> @NotNull ReversibleIterable<X> getCategoryItemsReversed​(@NotNull
                                                                                 @NotNull java.lang.Class<? extends X> xClass,
                                                                                 @NotNull
                                                                                 @NotNull java.util.BitSet bitSet)
      • categoriesBitSet

        @SafeVarargs
        @NotNull
        public final @NotNull java.util.BitSet categoriesBitSet​(@NotNull
                                                                @NotNull K... categories)
      • categoriesBitSet

        @NotNull
        public final @NotNull java.util.BitSet categoriesBitSet​(@NotNull
                                                                @NotNull java.util.Collection<? extends K> categories)