public Map<U, V> putEntry( T key, U valueKey, V value ) { Map<U, V> map = this.get( key ); map = map == null ? new HashMap<>() : map; map.put( valueKey, value ); return this.put( key, map ); }
public void putEntries( T key, Map<U, V> m ) { Map<U, V> map = this.get( key ); map = map == null ? new HashMap<>() : map; map.putAll( m ); this.put( key, map ); }
@SafeVarargs public static <T, U, V> MapMap<T, U, V> ofEntries( Map.Entry<T, Map<U, V>>... entries ) { MapMap<T, U, V> map = new MapMap<>(); for ( Map.Entry<T, Map<U, V>> entry : entries ) { map.put( entry.getKey(), entry.getValue() ); } return map; } }