public static ApiPlatform fromKeyToApiPlatform ( int key ) { if ( keyToPlatform . get ( ) == null ) { Map < Integer , ApiPlatform > map = new HashMap <> ( ) ; for ( ApiPlatform apiPlatform : ApiPlatform . values ( ) ) { map . put ( apiPlatform . getKey ( ) , apiPlatform ) ; } keyToPlatform . set ( Collections . unmodifiableMap ( map ) ) ; } return keyToPlatform . get ( ) . get ( key ) ; }
get the api platform given it s integer key value .