@NotThreadSafe public class AcceptMimeTypeList extends AbstractQValueList<com.helger.commons.mime.IMimeType>
m_aMap| Constructor and Description |
|---|
AcceptMimeTypeList() |
| Modifier and Type | Method and Description |
|---|---|
void |
addMimeType(com.helger.commons.mime.IMimeType aMimeType,
double dQuality) |
boolean |
explicitlySupportsMimeType(com.helger.commons.mime.IMimeType aMimeType)
Check if the passed MIME type is supported, without considering fallback
MIME types (xxx/*)
|
boolean |
explicitlySupportsMimeType(String sMimeType)
Check if the passed MIME type is supported, without considering fallback
MIME types (xxx/*)
|
double |
getQualityOfMimeType(com.helger.commons.mime.IMimeType aMimeType)
Return the associated quality of the given MIME type using the fallback
mechanism.
|
double |
getQualityOfMimeType(String sMimeType)
Return the associated quality of the given MIME type using the fallback
mechanism.
|
QValue |
getQValueOfMimeType(com.helger.commons.mime.IMimeType aMimeType)
Return the associated quality of the given MIME type using the fallback
mechanism.
|
boolean |
supportsMimeType(com.helger.commons.mime.IMimeType aMimeType)
Check if the passed MIME type is supported, incl. fallback handling
|
boolean |
supportsMimeType(String sMimeType)
Check if the passed MIME type is supported, incl. fallback handling
|
getAllQValues, getAllQValuesGreaterOrEqual, getAllQValuesGreaterThan, getAllQValuesLowerOrEqual, getAllQValuesLowerThan, toStringpublic void addMimeType(@Nonnull com.helger.commons.mime.IMimeType aMimeType, @Nonnegative double dQuality)
@Nonnull public QValue getQValueOfMimeType(@Nonnull com.helger.commons.mime.IMimeType aMimeType)
aMimeType - The charset name to query. May not be null.QValue of the mime typepublic double getQualityOfMimeType(@Nonnull String sMimeType)
sMimeType - The MIME type name to query. May be null.public double getQualityOfMimeType(@Nullable com.helger.commons.mime.IMimeType aMimeType)
aMimeType - The MIME type to query. May be null.null, the "not accepted" quality is returned.public boolean supportsMimeType(@Nonnull String sMimeType)
sMimeType - The MIME type to checktrue if it is supported, false if notpublic boolean supportsMimeType(@Nullable com.helger.commons.mime.IMimeType aMimeType)
aMimeType - The MIME type to check. May be null.true if it is supported, false if notpublic boolean explicitlySupportsMimeType(@Nonnull String sMimeType)
sMimeType - The MIME type to checktrue if it is supported, false if notpublic boolean explicitlySupportsMimeType(@Nullable com.helger.commons.mime.IMimeType aMimeType)
aMimeType - The MIME type to check. May be null.true if it is supported, false if notCopyright © 2016–2019 Philip Helger. All rights reserved.