Package org.jdrupes.httpcodec.types
Class MediaType
java.lang.Object
org.jdrupes.httpcodec.types.ParameterizedValue<MediaBase.MediaTypePair>
org.jdrupes.httpcodec.types.MediaBase
org.jdrupes.httpcodec.types.MediaType
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
A builder for the (immutable) parameterized type.static class
Nested classes/interfaces inherited from class org.jdrupes.httpcodec.types.MediaBase
MediaBase.MediaTypePair, MediaBase.MediaTypePairConverter
Nested classes/interfaces inherited from class org.jdrupes.httpcodec.types.ParameterizedValue
ParameterizedValue.ParameterizedValueConverter<T>, ParameterizedValue.ParamValueConverterBase<P extends ParameterizedValue<U>,
U> -
Field Summary
Fields inherited from class org.jdrupes.httpcodec.types.ParameterizedValue
WEIGHT_COMPARATOR
-
Constructor Summary
ConstructorDescriptionCreate a new object with the given type and subtype.Create a new object with the given type, subtype and parameters.MediaType
(MediaBase.MediaTypePair type, Map<String, String> parameters) Create a new object with the given type and parameters. -
Method Summary
Modifier and TypeMethodDescriptionstatic MediaType.Builder
builder()
Creates a new builder for a media type.Methods inherited from class org.jdrupes.httpcodec.types.MediaBase
subtype, topLevelType
Methods inherited from class org.jdrupes.httpcodec.types.ParameterizedValue
equals, hashCode, parameter, parameters, toString, value
-
Constructor Details
-
MediaType
Create a new object with the given type and subtype.- Parameters:
type
- the top-level typesubtype
- the subtype
-
MediaType
Create a new object with the given type, subtype and parameters.- Parameters:
type
- the top-level typesubtype
- the subtypeparameters
- the parameters
-
MediaType
Create a new object with the given type and parameters.- Parameters:
type
- the typeparameters
- the parameters
-
-
Method Details
-
builder
Creates a new builder for a media type.- Returns:
- the builder
-