@Override public Set<Map.Entry<K, V>> entrySet() { return entryStream().collect(Collectors.toCollection(LinkedHashSet::new)); }
@Override public Set<K> keySet() { return entryStream() .map(Map.Entry::getKey) .collect(Collectors.toCollection(LinkedHashSet::new)); }
@Override public boolean containsValue(Object o) { return entryStream().map(Map.Entry::getValue).anyMatch(v -> Objects.equals(v, o)); }
@Override public Collection<V> values() { return entryStream().map(Map.Entry::getValue).collect(Collectors.toSet()); }
/** * Return a non delegating map which snapshots the data visible in this delegating map, disconnected from changes * to this and the underlying delegates. * * @return A non delegating plain-map copy of the data visible in this map */ public LinkedHashMap<K, V> flatView() { return entryStream() .collect(StreamUtils.toLinkedMap(Map.Entry::getKey, Map.Entry::getValue)); }