Class ForwardingMapEntry<K,V>
- java.lang.Object
-
- com.google.common.collect.ForwardingObject
-
- com.google.common.collect.ForwardingMapEntry<K,V>
-
- All Implemented Interfaces:
java.util.Map.Entry<K,V>
@GwtCompatible @Deprecated(since="2022-12-01") public abstract class ForwardingMapEntry<K,V> extends ForwardingObject implements java.util.Map.Entry<K,V>
Deprecated.The Google Guava Core Libraries are deprecated and will not be part of the AEM SDK after April 2023A map entry which forwards all its method calls to another map entry. Subclasses should override one or more methods to modify the behavior of the backing map entry as desired per the decorator pattern.Warning: The methods of
ForwardingMapEntry
forward indiscriminately to the methods of the delegate. For example, overridinggetValue()
alone will not change the behavior ofequals(java.lang.Object)
, which can lead to unexpected behavior. In this case, you should overrideequals
as well, either providing your own implementation, or delegating to the providedstandardEquals
method.Each of the
standard
methods, where appropriate, useObjects.equal(java.lang.Object, java.lang.Object)
to test equality for both keys and values. This may not be the desired behavior for map implementations that use non-standard notions of key equality, such as the entry of aSortedMap
whose comparator is not consistent withequals
.The
standard
methods are not guaranteed to be thread-safe, even when all of the methods that they depend on are thread-safe.- Since:
- 2.0 (imported from Google Collections Library)
-
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description boolean
equals(java.lang.Object object)
Deprecated.K
getKey()
Deprecated.V
getValue()
Deprecated.int
hashCode()
Deprecated.V
setValue(V value)
Deprecated.-
Methods inherited from class com.google.common.collect.ForwardingObject
toString
-
-