@ SuppressWarnings ( { "unchecked" } ) public static < V > Optional < V > get ( Map < ? , ? > map , Class < V > type , Serializable id ) { return Optional . ofNullable ( ( V ) map . get ( new TypedIdKey <> ( type , id ) ) ) ; }
Retrieves a value with the given type and id from the given map .