V - The generic valuepublic interface ConvertibleMultiValues<V> extends ConvertibleValues<List<V>>
ConvertibleValues where each name has multiple possible values.EMPTY| Modifier and Type | Method and Description |
|---|---|
static <V> ConvertibleMultiValues<V> |
empty()
An empty
ConvertibleValues. |
default void |
forEach(BiConsumer<String,List<V>> action)
Performs the given action for each value.
|
default void |
forEachValue(BiConsumer<String,V> action)
Performs the given action for each header.
|
V |
get(CharSequence name)
Get a value without applying any conversion.
|
List<V> |
getAll(CharSequence name)
Get all the values for the given name without applying conversion.
|
default Optional<V> |
getFirst(CharSequence name)
Get the first value of the given header.
|
default <T> Optional<T> |
getFirst(CharSequence name,
Argument<T> requiredType)
Find a header and convert it to the given type.
|
default <T> Optional<T> |
getFirst(CharSequence name,
ArgumentConversionContext<T> conversionContext)
Find a header and convert it to the given type.
|
default <T> Optional<T> |
getFirst(CharSequence name,
Class<T> requiredType)
Find a header and convert it to the given type.
|
default <T> T |
getFirst(CharSequence name,
Class<T> requiredType,
T defaultValue)
Find a header and convert it to the given type.
|
default boolean |
isEmpty() |
default Iterator<Map.Entry<String,List<V>>> |
iterator() |
static <T> ConvertibleMultiValues<T> |
of(Map<CharSequence,List<T>> values)
Creates a new
OptionalValues for the given type and values. |
asMap, asMap, asProperties, contains, getValue, getValueType, names, of, subMap, subMap, subMap, valuesget, get, get, getforEach, spliteratorList<V> getAll(CharSequence name)
name - The header name@Nullable V get(CharSequence name)
name - The name of the valuegetFirst(CharSequence)default boolean isEmpty()
isEmpty in interface ConvertibleValues<List<V>>default void forEachValue(BiConsumer<String,V> action)
action - The action to be performed for each entryNullPointerException - if the specified action is nulldefault void forEach(BiConsumer<String,List<V>> action)
ConvertibleValuesforEach in interface ConvertibleValues<List<V>>action - The action to be performed for each entrydefault Optional<V> getFirst(CharSequence name)
name - The header namedefault <T> Optional<T> getFirst(CharSequence name, Class<T> requiredType)
T - The generic typename - The name of the headerrequiredType - The required typeOptional.empty()default <T> Optional<T> getFirst(CharSequence name, Argument<T> requiredType)
T - The generic typename - The name of the headerrequiredType - The required typeOptional.empty()default <T> Optional<T> getFirst(CharSequence name, ArgumentConversionContext<T> conversionContext)
T - The generic typename - The name of the headerconversionContext - The conversion contextOptional.empty()default <T> T getFirst(CharSequence name, Class<T> requiredType, T defaultValue)
T - The generic typename - The name of the headerrequiredType - The required typedefaultValue - The default valuestatic <T> ConvertibleMultiValues<T> of(Map<CharSequence,List<T>> values)
OptionalValues for the given type and values.T - The target generic typevalues - A map of valuesstatic <V> ConvertibleMultiValues<V> empty()
ConvertibleValues.empty in interface ConvertibleValues<List<V>>V - The generic typeConvertibleValues