private Map < String , RouteEntry > getAcceptedMimeTypes ( List < RouteEntry > routes ) { Map < String , RouteEntry > acceptedTypes = new HashMap <> ( ) ; for ( RouteEntry routeEntry : routes ) { if ( ! acceptedTypes . containsKey ( routeEntry . acceptedType ) ) { acceptedTypes . put ( routeEntry . acceptedType , routeEntry ) ; } } return acceptedTypes ; }
can be cached? I don t think so .