Beispiel #1
0
		/**
		** {@inheritDoc}
		**
		** This will add {@code key} to both maps, even if one of the values
		** of the tuple is {@code null}.
		*/
		@Override public X2<V0, V1> put(K key, X2<V0, V1> x) {
			if (containsKey(key)) {
				return Tuple.X2(m0.put(key, x._0), m1.put(key, x._1));
			} else {
				m0.put(key, x._0);
				m1.put(key, x._1);
				return null;
			}
		}
Beispiel #2
0
		@Override public V put(U2<K0, K1> u, V val) {
			return (u.type == 0)? m0.put(u.getT0(), val): m1.put(u.getT1(), val);
		}