java.lang.Object
io.helidon.http.HttpMediaType.Builder
- All Implemented Interfaces:
Builder<HttpMediaType.Builder,
,HttpMediaType> Supplier<HttpMediaType>
- Enclosing interface:
HttpMediaType
public static class HttpMediaType.Builder
extends Object
implements Builder<HttpMediaType.Builder,HttpMediaType>
Fluent API builder for
HttpMediaType
.-
Method Summary
Modifier and TypeMethodDescriptionaddParameter
(String parameter, String value) Add a new parameter to the parameter map.build()
Build the instance from this builder.Charset parameter to use.Media type to use.parameters
(Map<String, String> parameters) Parameters of the media type.q
(double q) Quality factor parameter to use.
-
Method Details
-
build
Description copied from interface:Builder
Build the instance from this builder.- Specified by:
build
in interfaceBuilder<HttpMediaType.Builder,
HttpMediaType> - Returns:
- instance of the built type
-
mediaType
Media type to use.- Parameters:
mediaType
- media type- Returns:
- updated builder
-
charset
Charset parameter to use.- Parameters:
charset
- charset- Returns:
- updated builder
-
addParameter
Add a new parameter to the parameter map.- Parameters:
parameter
- name of the parameter to addvalue
- value of the parameter to add- Returns:
- updated builder instance
-
parameters
Parameters of the media type.- Parameters:
parameters
- a map of media type parameters, default is empty- Returns:
- updated builder instance
-
q
Quality factor parameter to use.- Parameters:
q
- quality factor- Returns:
- updated builder
-