@ -284,16 +284,15 @@ public class MediaType implements Comparable<MediaType> {
@@ -284,16 +284,15 @@ public class MediaType implements Comparable<MediaType> {
* Create a new { @code MediaType } for the given type , subtype , and character set .
* @param type the primary type
* @param subtype the subtype
* @param charS et the character set
* @param chars et the character set
* @throws IllegalArgumentException if any of the parameters contain illegal characters
* /
public MediaType ( String type , String subtype , Charset charS et ) {
this ( type , subtype , Collections . singletonMap ( PARAM_CHARSET , charS et . name ( ) ) ) ;
public MediaType ( String type , String subtype , Charset chars et ) {
this ( type , subtype , Collections . singletonMap ( PARAM_CHARSET , chars et . name ( ) ) ) ;
}
/ * *
* Create a new { @code MediaType } for the given type , subtype , and quality value .
*
* @param type the primary type
* @param subtype the subtype
* @param qualityValue the quality value
@ -774,18 +773,18 @@ public class MediaType implements Comparable<MediaType> {
@@ -774,18 +773,18 @@ public class MediaType implements Comparable<MediaType> {
* Sorts the given list of { @code MediaType } objects by specificity .
* < p > Given two media types :
* < ol >
* < li > if either media type has a { @linkplain # isWildcardType ( ) wildcard type } , then the media type without the
* wildcard is ordered before the other . < / li >
* < li > if the two media types have different { @linkplain # getType ( ) types } , then they are considered equal and
* remain their current order . < / li >
* < li > if either media type has a { @linkplain # isWildcardSubtype ( ) wildcard subtype } , then the media type without
* the wildcard is sorted before the other . < / li >
* < li > if the two media types have different { @linkplain # getSubtype ( ) subtypes } , then they are considered equal
* and remain their current order . < / li >
* < li > if the two media types have different { @linkplain # getQualityValue ( ) quality value } , then the media type
* with the highest quality value is ordered before the other . < / li >
* < li > if the two media types have a different amount of { @linkplain # getParameter ( String ) parameters } , then the
* media type with the most parameters is ordered before the other . < / li >
* < li > if either media type has a { @linkplain # isWildcardType ( ) wildcard type } , then the media type without the
* wildcard is ordered before the other . < / li >
* < li > if the two media types have different { @linkplain # getType ( ) types } , then they are considered equal and
* remain their current order . < / li >
* < li > if either media type has a { @linkplain # isWildcardSubtype ( ) wildcard subtype } , then the media type without
* the wildcard is sorted before the other . < / li >
* < li > if the two media types have different { @linkplain # getSubtype ( ) subtypes } , then they are considered equal
* and remain their current order . < / li >
* < li > if the two media types have different { @linkplain # getQualityValue ( ) quality value } , then the media type
* with the highest quality value is ordered before the other . < / li >
* < li > if the two media types have a different amount of { @linkplain # getParameter ( String ) parameters } , then the
* media type with the most parameters is ordered before the other . < / li >
* < / ol >
* < p > For example :
* < blockquote > audio / basic & lt ; audio / * & lt ; * & # 047 ; * < / blockquote >
@ -807,18 +806,18 @@ public class MediaType implements Comparable<MediaType> {
@@ -807,18 +806,18 @@ public class MediaType implements Comparable<MediaType> {
* Sorts the given list of { @code MediaType } objects by quality value .
* < p > Given two media types :
* < ol >
* < li > if the two media types have different { @linkplain # getQualityValue ( ) quality value } , then the media type
* with the highest quality value is ordered before the other . < / li >
* < li > if either media type has a { @linkplain # isWildcardType ( ) wildcard type } , then the media type without the
* wildcard is ordered before the other . < / li >
* < li > if the two media types have different { @linkplain # getType ( ) types } , then they are considered equal and
* remain their current order . < / li >
* < li > if either media type has a { @linkplain # isWildcardSubtype ( ) wildcard subtype } , then the media type without
* the wildcard is sorted before the other . < / li >
* < li > if the two media types have different { @linkplain # getSubtype ( ) subtypes } , then they are considered equal
* and remain their current order . < / li >
* < li > if the two media types have a different amount of { @linkplain # getParameter ( String ) parameters } , then the
* media type with the most parameters is ordered before the other . < / li >
* < li > if the two media types have different { @linkplain # getQualityValue ( ) quality value } , then the media type
* with the highest quality value is ordered before the other . < / li >
* < li > if either media type has a { @linkplain # isWildcardType ( ) wildcard type } , then the media type without the
* wildcard is ordered before the other . < / li >
* < li > if the two media types have different { @linkplain # getType ( ) types } , then they are considered equal and
* remain their current order . < / li >
* < li > if either media type has a { @linkplain # isWildcardSubtype ( ) wildcard subtype } , then the media type without
* the wildcard is sorted before the other . < / li >
* < li > if the two media types have different { @linkplain # getSubtype ( ) subtypes } , then they are considered equal
* and remain their current order . < / li >
* < li > if the two media types have a different amount of { @linkplain # getParameter ( String ) parameters } , then the
* media type with the most parameters is ordered before the other . < / li >
* < / ol >
* @param mediaTypes the list of media types to be sorted
* @see # getQualityValue ( )