Class PrioritizedMenuIconMap<M extends Menu<M>>

java.lang.Object
com.kamikazejam.kamicommon.menu.api.struct.icons.PrioritizedMenuIconMap<M>

public class PrioritizedMenuIconMap<M extends Menu<M>> extends Object
  • Constructor Details

    • PrioritizedMenuIconMap

      public PrioritizedMenuIconMap()
    • PrioritizedMenuIconMap

      public PrioritizedMenuIconMap(@NotNull @NotNull Map<String,PrioritizedMenuIcon<M>> menuIcons, int priorityCounter)
  • Method Details

    • getMenuIcons

      @NotNull public @NotNull Map<String,MenuIcon<M>> getMenuIcons()
    • add

      public void add(@NotNull @NotNull PrioritizedMenuIcon<M> icon)
    • add

      public void add(@NotNull @NotNull MenuIcon<M> icon, @Nullable @Nullable IconSlot slot)
    • add

      public void add(@NotNull @NotNull MenuIcon<M> icon, @Nullable @Nullable IconSlot slot, int priority)
    • remove

      @Nullable public @Nullable MenuIcon<M> remove(@NotNull @NotNull String id)
    • remove

      @NotNull public @NotNull Set<MenuIcon<M>> remove(int slot, @NotNull @NotNull MenuSize size)
    • clear

      public void clear()
    • get

      @NotNull public @NotNull Optional<MenuIcon<M>> get(@NotNull @NotNull String id)
    • contains

      public boolean contains(@NotNull @NotNull String id)
    • keySet

      @NotNull public @NotNull Set<String> keySet()
    • getOrDefault

      @Contract("_, !null -> !null") @Nullable public @Nullable MenuIcon<M> getOrDefault(@NotNull @NotNull String id, MenuIcon<M> def)
    • forEach

      public void forEach(@NotNull @NotNull BiConsumer<String,MenuIcon<M>> action)
    • values

      @NotNull public @NotNull Collection<PrioritizedMenuIcon<M>> values()
    • getActiveIconForSlot

      @Nullable public @Nullable MenuIcon<M> getActiveIconForSlot(@NotNull @NotNull MenuSize size, int slot)
    • containsActiveIconForSlot

      public boolean containsActiveIconForSlot(@NotNull @NotNull MenuSize size, int slot)
    • getAllByAscendingPriority

      @NotNull public @NotNull List<MenuIcon<M>> getAllByAscendingPriority(boolean filterEnabled)
    • size

      public int size()
    • copy

      @NotNull public @NotNull PrioritizedMenuIconMap<M> copy()