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

Method withParameter

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

<em>Replaces</em> all parameters with the given attribute with a single parameter with the given value. If multiple parameters with the same attributes are necessary use {@link #withParameters(String, Iterable)}. Prefer {@link #withCharset} for setting the {@code charset} parameter when using a {@li

(String attribute, String value)

Source from the content-addressed store, hash-verified

934 * @throws IllegalArgumentException if either {@code attribute} or {@code value} is invalid
935 */
936 public MediaType withParameter(String attribute, String value) {
937 return withParameters(attribute, ImmutableSet.of(value));
938 }
939
940 /**
941 * Returns a new instance with the same type and subtype as this instance, with the {@code

Callers 9

withCharsetMethod · 0.95
testWithParameterMethod · 0.45
testIsMethod · 0.45
testEqualsMethod · 0.45
testToStringMethod · 0.45

Calls 2

withParametersMethod · 0.95
ofMethod · 0.95