@Override
    public boolean equals(final Object o) {
      if (!(o instanceof Map.Entry<?, ?>)) {
        return false;
      }
      final Map.Entry<?, ?> e = (Map.Entry<?, ?>) o;
      if (compareValues) {
        return ArrayUtils.objectEquals(key, e.getKey())
            && ArrayUtils.objectEquals(value, e.getValue());
      }
      return key == e.getKey() && value == e.getValue();
    }
Compares the specified object with this entry for equality. Returns {@code true} if the given
object is also a map entry and the two entries represent the same mapping. More formally, two
entries {@code e1} and {@code e2} represent the same mapping if

<pre>
(e1.getKey() == null ? e2.getKey() == null : e1.getKey().equals(e2.getKey()))
    &amp;&amp; (e1.getValue() == null ? e2.getValue() == null : e1.getValue().equals(e2.getValue()))
</pre>

This ensures that the {@code equals} method works properly across different implementations
of the {@code Map.Entry} interface.

@param o object to be compared for equality with this map entry
@return {@code true} if the specified object is equal to this map entry
@see #hashCode
geode-core/src/main/java/org/apache/geode/internal/util/concurrent/CustomEntryConcurrentHashMap.java