Class SingleValueExtractor<T>

    • Constructor Detail

      • SingleValueExtractor

        public SingleValueExtractor​(javax.ws.rs.ext.ParamConverter<T> converter,
                                    java.lang.String parameterName,
                                    java.lang.String defaultStringValue)
        Create new single value extractor.
        Parameters:
        converter - string value reader.
        parameterName - string parameter name.
        defaultStringValue - default string value.
    • Method Detail

      • extract

        public T extract​(javax.ws.rs.core.MultivaluedMap<java.lang.String,​java.lang.String> parameters)
        Extract the map entry identified by a name (and using the configured default value) from the supplied multivalued map.

        This implementation extracts the value of the parameter applying the underlying param converter to the first value found in the list of potential multiple parameter values. Any other values in the multi-value list will be ignored.

        Specified by:
        extract in interface MultivaluedParameterExtractor<T>
        Parameters:
        parameters - map of parameters.
        Returns:
        extracted single parameter value.