Class ItemFactoryMap<I,​P>

  • All Implemented Interfaces:
    java.util.Map<java.util.function.Function<P,​I>,​I>

    public class ItemFactoryMap<I,​P>
    extends java.lang.Object
    implements java.util.Map<java.util.function.Function<P,​I>,​I>
    • Nested Class Summary

      • Nested classes/interfaces inherited from interface java.util.Map

        java.util.Map.Entry<K extends java.lang.Object,​V extends java.lang.Object>
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected java.util.HashMap<java.util.function.Function<P,​I>,​I> itemMap  
      protected P param  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void clear()  
      boolean containsKey​(java.lang.Object o)  
      boolean containsValue​(java.lang.Object o)  
      java.util.Set<java.util.Map.Entry<java.util.function.Function<P,​I>,​I>> entrySet()  
      I get​(java.lang.Object o)  
      I getItem​(java.util.function.Function<P,​I> factory)  
      boolean isEmpty()  
      java.util.Set<java.util.function.Function<P,​I>> keySet()  
      I put​(java.util.function.Function<P,​I> factory, I i)  
      void putAll​(java.util.Map<? extends java.util.function.Function<P,​I>,​? extends I> map)  
      I remove​(java.lang.Object o)  
      int size()  
      java.util.Collection<I> values()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface java.util.Map

        compute, computeIfAbsent, computeIfPresent, equals, forEach, getOrDefault, hashCode, merge, putIfAbsent, remove, replace, replace, replaceAll
    • Field Detail

      • itemMap

        protected final java.util.HashMap<java.util.function.Function<P,​I>,​I> itemMap
      • param

        @NotNull
        protected final P param
    • Constructor Detail

      • ItemFactoryMap

        public ItemFactoryMap​(@NotNull
                              P param)
      • ItemFactoryMap

        public ItemFactoryMap​(@NotNull
                              P param,
                              int capacity)
    • Method Detail

      • getItem

        public I getItem​(java.util.function.Function<P,​I> factory)
      • get

        @Nullable
        public I get​(@Nullable
                     java.lang.Object o)
        Specified by:
        get in interface java.util.Map<I,​P>
      • size

        public int size()
        Specified by:
        size in interface java.util.Map<I,​P>
      • isEmpty

        public boolean isEmpty()
        Specified by:
        isEmpty in interface java.util.Map<I,​P>
      • containsKey

        public boolean containsKey​(@Nullable
                                   java.lang.Object o)
        Specified by:
        containsKey in interface java.util.Map<I,​P>
      • put

        @Nullable
        public I put​(@NotNull
                     java.util.function.Function<P,​I> factory,
                     @NotNull
                     I i)
        Specified by:
        put in interface java.util.Map<I,​P>
      • putAll

        public void putAll​(@NotNull
                           java.util.Map<? extends java.util.function.Function<P,​I>,​? extends I> map)
        Specified by:
        putAll in interface java.util.Map<I,​P>
      • remove

        @Nullable
        public I remove​(@Nullable
                        java.lang.Object o)
        Specified by:
        remove in interface java.util.Map<I,​P>
      • clear

        public void clear()
        Specified by:
        clear in interface java.util.Map<I,​P>
      • containsValue

        public boolean containsValue​(@Nullable
                                     java.lang.Object o)
        Specified by:
        containsValue in interface java.util.Map<I,​P>
      • keySet

        @NotNull
        public java.util.Set<java.util.function.Function<P,​I>> keySet()
        Specified by:
        keySet in interface java.util.Map<I,​P>
      • values

        @NotNull
        public java.util.Collection<I> values()
        Specified by:
        values in interface java.util.Map<I,​P>
      • entrySet

        @NotNull
        public java.util.Set<java.util.Map.Entry<java.util.function.Function<P,​I>,​I>> entrySet()
        Specified by:
        entrySet in interface java.util.Map<I,​P>