MCPcopy Create free account
hub / github.com/antlr/codebuff / is

Method is

output/java_guava/1.4.17/MediaType.java:826–830  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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.

Callers

nothing calls this directly

Calls 3

equalsMethod · 0.65
containsAllMethod · 0.65
entriesMethod · 0.65

Tested by

no test coverage detected