@Test public void toString_type_wildcard() { ContentType contentType = new ContentType("text", "*", new HashMap<>()); String string = contentType.toString(); assertThat(string).isEqualTo("text/*"); }
@Override public String toString() { StringBuilder builder = new StringBuilder().append(type).append('/').append(subType); for (Entry<String, String> parameter : parameters.entrySet()) { builder.append("; ").append(parameter.getKey()).append('=').append(parameter.getValue()); } return builder.toString(); }
ContentType { @Override public String toString() { StringBuilder builder = new StringBuilder().append(type).append('/').append(subType); for (Entry<String, String> parameter : parameters.entrySet()) { builder.append("; ").append(parameter.getKey()).append('=').append(parameter.getValue()); } return builder.toString(); } }
ContentType { @Override public String toString() { StringBuilder builder = new StringBuilder().append(type).append('/').append(subType); for (Entry<String, String> parameter : parameters.entrySet()) { builder.append("; ").append(parameter.getKey()).append('=').append(parameter.getValue()); } return builder.toString(); } ContentType(
            String type,
            String subType,
            Map<String, String> parameters); }
ContentType { @Override public String toString() { StringBuilder builder = new StringBuilder().append(type).append('/').append(subType); for (Entry<String, String> parameter : parameters.entrySet()) { builder.append("; ").append(parameter.getKey()).append('=').append(parameter.getValue()); } return builder.toString(); } ContentType(
            String type,
            String subType,
            Map<String, String> parameters); static ContentType valueOf(String value); @Override String toString(); @Override boolean equals(Object o); @Override int hashCode(); String getType(); boolean isWildcardType(); String getSubType(); boolean isWildcardSubType(); boolean isWildcard(); Map<String, String> getParameters(); boolean isCompatible(ContentType other); }
ContentType { @Override public String toString() { StringBuilder builder = new StringBuilder().append(type).append('/').append(subType); for (Entry<String, String> parameter : parameters.entrySet()) { builder.append("; ").append(parameter.getKey()).append('=').append(parameter.getValue()); } return builder.toString(); } ContentType(
            String type,
            String subType,
            Map<String, String> parameters); static ContentType valueOf(String value); @Override String toString(); @Override boolean equals(Object o); @Override int hashCode(); String getType(); boolean isWildcardType(); String getSubType(); boolean isWildcardSubType(); boolean isWildcard(); Map<String, String> getParameters(); boolean isCompatible(ContentType other);  }