@Test public void testGetAs2d() { assertEquals(0, personMap.getAs2d("invalid").size()); assertEquals(2, personMap.getAs2d("Australia").size()); assertEquals(2, personMap.getAs2d("New Zealand").size()); assertEquals(1, personMap.getAs2d("United Kingdom").size()); assertEquals(1, personMap.getAs2d("India").size()); }
public TwoDHashMap<K2, K3, V> getAs2d(final K1 firstKey) { final HashMap<K2, HashMap<K3, V>> innerMap1 = map.get(firstKey); if( innerMap1 != null ) { return new TwoDHashMap<K2, K3, V>(innerMap1); } else { return new TwoDHashMap<K2, K3, V>(); } }
ThreeDHashMap { public TwoDHashMap<K2, K3, V> getAs2d(final K1 firstKey) { final HashMap<K2, HashMap<K3, V>> innerMap1 = map.get(firstKey); if( innerMap1 != null ) { return new TwoDHashMap<K2, K3, V>(innerMap1); } else { return new TwoDHashMap<K2, K3, V>(); } } }
ThreeDHashMap { public TwoDHashMap<K2, K3, V> getAs2d(final K1 firstKey) { final HashMap<K2, HashMap<K3, V>> innerMap1 = map.get(firstKey); if( innerMap1 != null ) { return new TwoDHashMap<K2, K3, V>(innerMap1); } else { return new TwoDHashMap<K2, K3, V>(); } }  }
ThreeDHashMap { public TwoDHashMap<K2, K3, V> getAs2d(final K1 firstKey) { final HashMap<K2, HashMap<K3, V>> innerMap1 = map.get(firstKey); if( innerMap1 != null ) { return new TwoDHashMap<K2, K3, V>(innerMap1); } else { return new TwoDHashMap<K2, K3, V>(); } }  boolean containsKey(final K1 firstKey, final K2 secondKey); boolean containsKey(final K1 firstKey, final K2 secondKey, final K3 thirdKey); HashMap<K2, HashMap<K3, V>> get(final K1 firstKey); TwoDHashMap<K2, K3, V> getAs2d(final K1 firstKey); HashMap<K3, V> get(final K1 firstKey, final K2 secondKey); V get(final K1 firstKey, final K2 secondKey, final K3 thirdKey); Object set(final K1 firstKey, final K2 secondKey, final K3 thirdKey, final V value); int size(); int size(final K1 firstKey); int size(final K1 firstKey, final K2 secondKey); Set<K1> keySet(); }
ThreeDHashMap { public TwoDHashMap<K2, K3, V> getAs2d(final K1 firstKey) { final HashMap<K2, HashMap<K3, V>> innerMap1 = map.get(firstKey); if( innerMap1 != null ) { return new TwoDHashMap<K2, K3, V>(innerMap1); } else { return new TwoDHashMap<K2, K3, V>(); } }  boolean containsKey(final K1 firstKey, final K2 secondKey); boolean containsKey(final K1 firstKey, final K2 secondKey, final K3 thirdKey); HashMap<K2, HashMap<K3, V>> get(final K1 firstKey); TwoDHashMap<K2, K3, V> getAs2d(final K1 firstKey); HashMap<K3, V> get(final K1 firstKey, final K2 secondKey); V get(final K1 firstKey, final K2 secondKey, final K3 thirdKey); Object set(final K1 firstKey, final K2 secondKey, final K3 thirdKey, final V value); int size(); int size(final K1 firstKey); int size(final K1 firstKey, final K2 secondKey); Set<K1> keySet();  }