@Override
    @SuppressWarnings("unchecked")
    public boolean contains(Object o) {
      if (!(o instanceof Map.Entry))
        return false;
      final Map.Entry<Object,V> e = (Map.Entry<Object,V>)o;
      final Object key = e.getKey();
      final Object val = e.getValue();
      final Object v = get(key);
      return Objects.equals(v, val);
    }
public EntrySet class so efficient methods are exposed to users
linguistics/src/main/java/com/yahoo/language/simple/kstem/CharArrayMap.java