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
                                 java.util.function.Function<V,​K> mapper,
                                 @Nullable
                                 CollectionHost<V> host)
      • ClassificationBag

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

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

      • 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 java.util.BitSet getCategorySet​(@Nullable
                                               K category)
      • getCategoryCount

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

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

        public void clear()
      • getCategoryItems

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

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

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

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

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

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

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

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