Class ClassificationBag<K,​V>


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

      • ClassificationBag

        public ClassificationBag​(Function<V,​K> mapper)
      • 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)
      • 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)
      • getCategorySet

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

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

        @NotNull
        public @NotNull Map<K,​BitSet> getCategoryMap()
      • 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)