Interface Parametrized
- All Known Subinterfaces:
MediaType
public interface Parametrized
Interface of an object that has typed parameters.
-
Method Summary
Modifier and TypeMethodDescription<T> Parameter<T>firstParameter(ParameterType<T> parameterType, T defaultValue) Returns the firstParameterof the given type or a parameter with a default value if no such parameter exists.<T> booleanhasParameter(ParameterType<T> parameterType) Checks whether this object has aParameterof the givenParameterType.parameters(ParameterType<T> parameterType)
-
Method Details
-
firstParameter
Returns the firstParameterof the given type or a parameter with a default value if no such parameter exists.- Parameters:
parameterType- TheParameterType.defaultValue- The value to return in case no such parameter is present.- Returns:
- The
Parameter.
-
parameters
Returns anIteratorof allParameters of the givenParameterType. Returns an emptyIteratorof no such parameter exists.- Parameters:
parameterType- TheParameterTypeof the parameters to return.- Returns:
- An
IteratorofParameters.
-
hasParameter
Checks whether this object has aParameterof the givenParameterType.- Parameters:
parameterType- TheParameterTypeto check.- Returns:
trueif such a parameter is present,falseotherwise.
-