public PersistentMap<K, V> include(Map<K, V> values) { PersistentMap<K, V> pm = this; for (Map.Entry<K, V> entry : values.entrySet()) { pm = pm.include(entry.getKey(), entry.getValue()); } return pm; }
public PersistentMap<K, V> delete(Collection<K> keys) { PersistentMap<K, V> pm = this; for (K k : keys) { pm = pm.delete(k); } return pm; }
public boolean containsAll(PersistentMap<K, V> pm) { for (Map.Entry<K, V> ent : pm.entrySet()) { if (!containsEntry(ent)) return false; } return true; }
public boolean equals(PersistentMap<K, V> pm) { if (this == pm) return true; if (this.size() != pm.size()) return false; return this.containsAll(pm) && pm.containsAll(this); }