public int size ( final K1 firstKey , final K2 secondKey ) { // existence check on inner map final HashMap < K2 , HashMap < K3 , V > > innerMap1 = map . get ( firstKey ) ; if ( innerMap1 == null ) { return 0 ; } // existence check on inner map1 final HashMap < K3 , V > innerMap2 = innerMap1 . get ( secondKey ) ; if ( innerMap2 == null ) { return 0 ; } return innerMap2 . size ( ) ; }
Returns the number of key - value mappings in this map for the third key .