Class LazyMap<X,​Y>

  • All Implemented Interfaces:
    java.util.Map<X,​Y>
    Direct Known Subclasses:
    LazyExceptionRetainingMap

    public class LazyMap<X,​Y>
    extends java.lang.Object
    implements java.util.Map<X,​Y>
    • 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>
    • Constructor Summary

      Constructors 
      Constructor Description
      LazyMap​(java.util.Map<X,​Y> inner, UnaryFunction<X,​Y> factory)  
    • 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<X,​Y>> entrySet()  
      Y get​(java.lang.Object o)  
      Y getWithout​(X x)  
      boolean isEmpty()  
      java.util.Set<X> keySet()  
      Y put​(X x, Y y)  
      void putAll​(java.util.Map<? extends X,​? extends Y> map)  
      Y remove​(java.lang.Object o)  
      int size()  
      java.util.Collection<Y> 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

      • inner

        private final java.util.Map<X,​Y> inner
    • Constructor Detail

      • LazyMap

        public LazyMap​(java.util.Map<X,​Y> inner,
                       UnaryFunction<X,​Y> factory)
    • Method Detail

      • size

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

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

        public boolean containsKey​(java.lang.Object o)
        Specified by:
        containsKey in interface java.util.Map<X,​Y>
      • containsValue

        public boolean containsValue​(java.lang.Object o)
        Specified by:
        containsValue in interface java.util.Map<X,​Y>
      • get

        public Y get​(java.lang.Object o)
        Specified by:
        get in interface java.util.Map<X,​Y>
      • put

        public Y put​(X x,
                     Y y)
        Specified by:
        put in interface java.util.Map<X,​Y>
      • remove

        public Y remove​(java.lang.Object o)
        Specified by:
        remove in interface java.util.Map<X,​Y>
      • putAll

        public void putAll​(java.util.Map<? extends X,​? extends Y> map)
        Specified by:
        putAll in interface java.util.Map<X,​Y>
      • clear

        public void clear()
        Specified by:
        clear in interface java.util.Map<X,​Y>
      • keySet

        public java.util.Set<X> keySet()
        Specified by:
        keySet in interface java.util.Map<X,​Y>
      • values

        public java.util.Collection<Y> values()
        Specified by:
        values in interface java.util.Map<X,​Y>
      • entrySet

        public java.util.Set<java.util.Map.Entry<X,​Y>> entrySet()
        Specified by:
        entrySet in interface java.util.Map<X,​Y>
      • getWithout

        public Y getWithout​(X x)