Returns true if this instance falls within the range (as defined by the HTTP Accept header ) given by the argument according to three criteria: The type of the argument is the wildcard or equal to the type of this
(MediaType mediaTypeRange)
| 824 | |
| 825 | |
| 826 | public boolean is(MediaType mediaTypeRange) { |
| 827 | return (mediaTypeRange.type.equals(WILDCARD) |
| 828 | || mediaTypeRange.type.equals(this.type)) && (mediaTypeRange.subtype.equals(WILDCARD) |
| 829 | || mediaTypeRange.subtype.equals(this.subtype)) && this.parameters.entries().containsAll(mediaTypeRange.parameters.entries()); |
| 830 | } |
| 831 | |
| 832 | /** |
| 833 | * Creates a new media type with the given type and subtype. |
nothing calls this directly
no test coverage detected