public D getOrCreate ( E el , P pseudo ) { D ret ; if ( pseudo == null ) { ret = mainMap . get ( el ) ; if ( ret == null ) { ret = createDataInstance ( ) ; mainMap . put ( el , ret ) ; } } else { HashMap < P , D > map = pseudoMaps . get ( el ) ; if ( map == null ) { map = new HashMap < P , D > ( ) ; pseudoMaps . put ( el , map ) ; } ret = map . get ( pseudo ) ; if ( ret == null ) { ret = createDataInstance ( ) ; map . put ( pseudo , ret ) ; } } return ret ; }
Gets the data or creates an empty list if it does not exist yet .