protected int score ( MediaType contentTypeFromRequest , MediaType ... expectedTypes ) { if ( contentTypeFromRequest == null ) { return DEFAULT_SCORE ; } for ( MediaType expected : expectedTypes ) { if ( contentTypeFromRequest . matches ( expected ) ) { return MAXIMUM_FORMAT_SCORE ; } } return DEFAULT_SCORE ; }
Calculates score based on given media type .