MCPcopy
hub / github.com/google/guava / create

Method create

guava/src/com/google/common/net/MediaType.java:1003–1007  ·  view source on GitHub ↗

Creates a new media type with the given type and subtype. @throws IllegalArgumentException if type or subtype is invalid or if a wildcard is used for the type, but not the subtype.

(String type, String subtype)

Source from the content-addressed store, hash-verified

1001 * type, but not the subtype.
1002 */
1003 public static MediaType create(String type, String subtype) {
1004 MediaType mediaType = create(type, subtype, ImmutableListMultimap.<String, String>of());
1005 mediaType.parsedCharset = Optional.absent();
1006 return mediaType;
1007 }
1008
1009 private static MediaType create(
1010 String type, String subtype, Multimap<String, String> parameters) {

Callers 15

withoutParametersMethod · 0.95
withParametersMethod · 0.95
createApplicationTypeMethod · 0.95
createAudioTypeMethod · 0.95
createFontTypeMethod · 0.95
createImageTypeMethod · 0.95
createTextTypeMethod · 0.95
createVideoTypeMethod · 0.95
parseMethod · 0.95

Calls 15

ofMethod · 0.95
absentMethod · 0.95
normalizeTokenMethod · 0.95
builderMethod · 0.95
equalsMethod · 0.65
entriesMethod · 0.65
getKeyMethod · 0.65
putMethod · 0.65
getValueMethod · 0.65
getMethod · 0.65
checkNotNullMethod · 0.45

Tested by 11

testCreate_emptyTypeMethod · 0.76
testEqualsMethod · 0.76
testToStringMethod · 0.76