Beispiel #1
0
 public static <K, V, M extends PersistentMap<K, V>> Pair<M, Option<V>> remove(M map, K key) {
   return Pair.pair(Unchecked.<M>cast(map.delete(key)), map.lookup(key));
 }
Beispiel #2
0
 public static <K, V, M extends PersistentMap<K, V>> Pair<M, Option<V>> put(
     M map, K key, V newValue) {
   return Pair.pair(Unchecked.<M>cast(map.insert(key, newValue)), map.lookup(key));
 }