Class MapConstraints.ConstrainedMap<K,​V>

    • Field Detail

      • delegate

        private final java.util.Map<K,​V> delegate
      • entrySet

        private transient java.util.Set<java.util.Map.Entry<K,​V>> entrySet
    • Constructor Detail

      • ConstrainedMap

        ConstrainedMap​(java.util.Map<K,​V> delegate,
                       MapConstraint<? super K,​? super V> constraint)
    • Method Detail

      • delegate

        protected java.util.Map<K,​V> delegate()
        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 ForwardingMap<K,​V>
      • entrySet

        public java.util.Set<java.util.Map.Entry<K,​V>> entrySet()
        Specified by:
        entrySet in interface java.util.Map<K,​V>
        Overrides:
        entrySet in class ForwardingMap<K,​V>
      • put

        public V put​(K key,
                     V value)
        Specified by:
        put in interface java.util.Map<K,​V>
        Overrides:
        put in class ForwardingMap<K,​V>
      • putAll

        public void putAll​(java.util.Map<? extends K,​? extends V> map)
        Specified by:
        putAll in interface java.util.Map<K,​V>
        Overrides:
        putAll in class ForwardingMap<K,​V>