Class Maps.AsMapView<K,​V>

    • Nested Class Summary

      • Nested classes/interfaces inherited from class java.util.AbstractMap

        java.util.AbstractMap.SimpleEntry<K extends java.lang.Object,​V extends java.lang.Object>, java.util.AbstractMap.SimpleImmutableEntry<K extends java.lang.Object,​V extends java.lang.Object>
      • 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
      (package private) Function<? super K,​V> function  
      private java.util.Set<K> set  
    • Constructor Summary

      Constructors 
      Constructor Description
      AsMapView​(java.util.Set<K> set, Function<? super K,​V> function)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      (package private) java.util.Set<K> backingSet()  
      void clear()  
      boolean containsKey​(java.lang.Object key)  
      protected java.util.Set<java.util.Map.Entry<K,​V>> createEntrySet()
      Creates the entry set to be returned by Maps.ViewCachingAbstractMap.entrySet().
      java.util.Set<K> createKeySet()  
      (package private) java.util.Collection<V> createValues()  
      void forEach​(java.util.function.BiConsumer<? super K,​? super V> action)  
      V get​(java.lang.Object key)  
      V getOrDefault​(java.lang.Object key, V defaultValue)  
      V remove​(java.lang.Object key)  
      int size()  
      • Methods inherited from class java.util.AbstractMap

        clone, containsValue, equals, hashCode, isEmpty, put, putAll, toString
      • Methods inherited from class java.lang.Object

        finalize, getClass, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface java.util.Map

        compute, computeIfAbsent, computeIfPresent, merge, putIfAbsent, remove, replace, replace, replaceAll
    • Field Detail

      • set

        private final java.util.Set<K> set
      • function

        final Function<? super K,​V> function
    • Constructor Detail

      • AsMapView

        AsMapView​(java.util.Set<K> set,
                  Function<? super K,​V> function)
    • Method Detail

      • backingSet

        java.util.Set<K> backingSet()
      • size

        public int size()
        Specified by:
        size in interface java.util.Map<K,​V>
        Overrides:
        size in class java.util.AbstractMap<K,​V>
      • containsKey

        public boolean containsKey​(java.lang.Object key)
        Specified by:
        containsKey in interface java.util.Map<K,​V>
        Overrides:
        containsKey in class java.util.AbstractMap<K,​V>
      • get

        public V get​(java.lang.Object key)
        Specified by:
        get in interface java.util.Map<K,​V>
        Overrides:
        get in class java.util.AbstractMap<K,​V>
      • getOrDefault

        public V getOrDefault​(java.lang.Object key,
                              V defaultValue)
      • remove

        public V remove​(java.lang.Object key)
        Specified by:
        remove in interface java.util.Map<K,​V>
        Overrides:
        remove in class java.util.AbstractMap<K,​V>
      • clear

        public void clear()
        Specified by:
        clear in interface java.util.Map<K,​V>
        Overrides:
        clear in class java.util.AbstractMap<K,​V>
      • forEach

        public void forEach​(java.util.function.BiConsumer<? super K,​? super V> action)