boolean (Object obj) { if (obj == this) return true; if (!(obj instanceof KeyFMap)) return false; KeyFMap other = (KeyFMap)obj; if (this.size() != other.size()) return false; return myMap.entrySet().stream().allMatch(entry -> Objects.equals(entry.getValue(),other.get(entry.getKey()))); }