From f2f58f1677357ca4e43e00080a97d40012257556 Mon Sep 17 00:00:00 2001 From: Sam Brannen Date: Tue, 23 Jun 2015 21:26:50 +0200 Subject: [PATCH] Polish Javadoc in MimeType --- .../org/springframework/util/MimeType.java | 36 ++++++++++--------- 1 file changed, 20 insertions(+), 16 deletions(-) diff --git a/spring-core/src/main/java/org/springframework/util/MimeType.java b/spring-core/src/main/java/org/springframework/util/MimeType.java index 894a0dc594..f4ca7953ed 100644 --- a/spring-core/src/main/java/org/springframework/util/MimeType.java +++ b/spring-core/src/main/java/org/springframework/util/MimeType.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2014 the original author or authors. + * Copyright 2002-2015 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -29,8 +29,10 @@ import java.util.TreeSet; /** * Represents a MIME Type, as originally defined in RFC 2046 and subsequently used in - * other Internet protocols including HTTP. This class however does not contain support - * the q-parameters used in HTTP content negotiation. Those can be found in the sub-class + * other Internet protocols including HTTP. + * + *

This class, however, does not contain support for the q-parameters used + * in HTTP content negotiation. Those can be found in the sub-class * {@code org.springframework.http.MediaType} in the {@code spring-web} module. * *

Consists of a {@linkplain #getType() type} and a {@linkplain #getSubtype() subtype}. @@ -40,6 +42,7 @@ import java.util.TreeSet; * @author Arjen Poutsma * @author Juergen Hoeller * @author Rossen Stoyanchev + * @author Sam Brannen * @since 4.0 * @see MimeTypeUtils */ @@ -99,9 +102,10 @@ public class MimeType implements Comparable, Serializable { /** * Create a new {@code MimeType} for the given primary type. - *

The {@linkplain #getSubtype() subtype} is set to "*", parameters empty. + *

The {@linkplain #getSubtype() subtype} is set to "*", + * and the parameters are empty. * @param type the primary type - * @throws IllegalArgumentException if any of the parameters contain illegal characters + * @throws IllegalArgumentException if any of the parameters contains illegal characters */ public MimeType(String type) { this(type, WILDCARD_TYPE); @@ -112,7 +116,7 @@ public class MimeType implements Comparable, Serializable { *

The parameters are empty. * @param type the primary type * @param subtype the subtype - * @throws IllegalArgumentException if any of the parameters contain illegal characters + * @throws IllegalArgumentException if any of the parameters contains illegal characters */ public MimeType(String type, String subtype) { this(type, subtype, Collections.emptyMap()); @@ -123,7 +127,7 @@ public class MimeType implements Comparable, Serializable { * @param type the primary type * @param subtype the subtype * @param charSet the character set - * @throws IllegalArgumentException if any of the parameters contain illegal characters + * @throws IllegalArgumentException if any of the parameters contains illegal characters */ public MimeType(String type, String subtype, Charset charSet) { this(type, subtype, Collections.singletonMap(PARAM_CHARSET, charSet.name())); @@ -134,7 +138,7 @@ public class MimeType implements Comparable, Serializable { * and allows for different parameter. * @param other the other media type * @param parameters the parameters, may be {@code null} - * @throws IllegalArgumentException if any of the parameters contain illegal characters + * @throws IllegalArgumentException if any of the parameters contains illegal characters */ public MimeType(MimeType other, Map parameters) { this(other.getType(), other.getSubtype(), parameters); @@ -145,7 +149,7 @@ public class MimeType implements Comparable, Serializable { * @param type the primary type * @param subtype the subtype * @param parameters the parameters, may be {@code null} - * @throws IllegalArgumentException if any of the parameters contain illegal characters + * @throws IllegalArgumentException if any of the parameters contains illegal characters */ public MimeType(String type, String subtype, Map parameters) { Assert.hasLength(type, "type must not be empty"); @@ -215,25 +219,25 @@ public class MimeType implements Comparable, Serializable { /** * Indicates whether the {@linkplain #getType() type} is the wildcard character - * {@code *} or not. + * * or not. */ public boolean isWildcardType() { return WILDCARD_TYPE.equals(getType()); } /** - * Indicates whether the {@linkplain #getSubtype() subtype} is the wildcard character - * {@code *} or the wildcard character followed by a sufiix (e.g. - * {@code *+xml}), or not. - * @return whether the subtype is {@code *} + * Indicates whether the {@linkplain #getSubtype() subtype} is the wildcard + * character * or the wildcard character followed by a suffix + * (e.g. *+xml). + * @return whether the subtype is a wildcard */ public boolean isWildcardSubtype() { return WILDCARD_TYPE.equals(getSubtype()) || getSubtype().startsWith("*+"); } /** - * Indicates whether this media type is concrete, i.e. whether neither the type or - * subtype is a wildcard character {@code *}. + * Indicates whether this media type is concrete, i.e. whether neither the type + * nor the subtype is a wildcard character *. * @return whether this media type is concrete */ public boolean isConcrete() {