Class ForwardingMap<K extends @Nullable java.lang.Object,​V extends @Nullable java.lang.Object>

    • Constructor Detail

      • ForwardingMap

        protected ForwardingMap()
        Constructor for use by subclasses.
    • Method Detail

      • delegate

        protected abstract java.util.Map<K,​Vdelegate()
        Description copied from class: ForwardingObject
        Returns the backing delegate instance that methods are forwarded to. Abstract subclasses generally override this method with an abstract method that has a more specific return type, such as ForwardingSet.delegate(). Concrete subclasses override this method to supply the instance being decorated.
        Specified by:
        delegate in class ForwardingObject
      • size

        public int size()
        Specified by:
        size in interface java.util.Map<K extends @Nullable java.lang.Object,​V extends @Nullable java.lang.Object>
      • isEmpty

        public boolean isEmpty()
        Specified by:
        isEmpty in interface java.util.Map<K extends @Nullable java.lang.Object,​V extends @Nullable java.lang.Object>
      • remove

        @CanIgnoreReturnValue
        @CheckForNull
        public V remove​(@CheckForNull
                        java.lang.Object key)
        Specified by:
        remove in interface java.util.Map<K extends @Nullable java.lang.Object,​V extends @Nullable java.lang.Object>
      • clear

        public void clear()
        Specified by:
        clear in interface java.util.Map<K extends @Nullable java.lang.Object,​V extends @Nullable java.lang.Object>
      • containsKey

        public boolean containsKey​(@CheckForNull
                                   java.lang.Object key)
        Specified by:
        containsKey in interface java.util.Map<K extends @Nullable java.lang.Object,​V extends @Nullable java.lang.Object>
      • containsValue

        public boolean containsValue​(@CheckForNull
                                     java.lang.Object value)
        Specified by:
        containsValue in interface java.util.Map<K extends @Nullable java.lang.Object,​V extends @Nullable java.lang.Object>
      • get

        @CheckForNull
        public V get​(@CheckForNull
                     java.lang.Object key)
        Specified by:
        get in interface java.util.Map<K extends @Nullable java.lang.Object,​V extends @Nullable java.lang.Object>
      • put

        @CanIgnoreReturnValue
        @CheckForNull
        public V put​(K key,
                     V value)
        Specified by:
        put in interface java.util.Map<K extends @Nullable java.lang.Object,​V extends @Nullable java.lang.Object>
      • putAll

        public void putAll​(java.util.Map<? extends K,​? extends V> map)
        Specified by:
        putAll in interface java.util.Map<K extends @Nullable java.lang.Object,​V extends @Nullable java.lang.Object>
      • keySet

        public java.util.Set<KkeySet()
        Specified by:
        keySet in interface java.util.Map<K extends @Nullable java.lang.Object,​V extends @Nullable java.lang.Object>
      • values

        public java.util.Collection<Vvalues()
        Specified by:
        values in interface java.util.Map<K extends @Nullable java.lang.Object,​V extends @Nullable java.lang.Object>
      • entrySet

        public java.util.Set<java.util.Map.Entry<K,​V>> entrySet()
        Specified by:
        entrySet in interface java.util.Map<K extends @Nullable java.lang.Object,​V extends @Nullable java.lang.Object>
      • equals

        public boolean equals​(@CheckForNull
                              java.lang.Object object)
        Specified by:
        equals in interface java.util.Map<K extends @Nullable java.lang.Object,​V extends @Nullable java.lang.Object>
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Specified by:
        hashCode in interface java.util.Map<K extends @Nullable java.lang.Object,​V extends @Nullable java.lang.Object>
        Overrides:
        hashCode in class java.lang.Object
      • standardClear

        protected void standardClear()
        A sensible definition of clear() in terms of the iterator method of entrySet(). In many cases, you may wish to override clear() to forward to this implementation.
        Since:
        7.0