Package org.jdrupes.httpcodec.types
Class ParameterizedValue.Builder<R extends ParameterizedValue<T>,T>
java.lang.Object
org.jdrupes.httpcodec.types.ParameterizedValue.Builder<R,T>
- Type Parameters:
R
- the type of the parameterized valueT
- the type of the unparameterized value
- Direct Known Subclasses:
MediaRange.Builder
,MediaType.Builder
- Enclosing class:
- ParameterizedValue<U>
A builder for the (immutable) parameterized type.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Returns the object built.from
(ParameterizedValue<T> existing) Initialize the builder from an existing value.Remove a parametersetParameter
(String name, String value) Set a parameter.Set a new value.
-
Constructor Details
-
Builder
-
-
Method Details
-
from
Initialize the builder from an existing value.- Parameters:
existing
- the existing value, assumed to be immutable- Returns:
- the builder for easy chaining
-
build
Returns the object built.- Returns:
- the object
-
setValue
Set a new value.- Parameters:
value
- the value- Returns:
- the builder for easy chaining
-
setParameter
Set a parameter.- Parameters:
name
- the parameter namevalue
- the value- Returns:
- the builder for easy chaining
-
remove
Remove a parameter- Parameters:
name
- the parameter name- Returns:
- the builder for easy chaining
-