Package io.micronaut.core.value
Interface OptionalMultiValues<V>
- Type Parameters:
V
- The generic value
- All Superinterfaces:
Iterable<CharSequence>
,OptionalValues<List<V>>
- Since:
- 1.0
- Author:
- Graeme Rocher
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> OptionalMultiValues<T>
empty()
An emptyOptionalValues
.getFirst
(CharSequence name) Retrieve a value if it is present.static <T> OptionalMultiValues<T>
of
(Map<CharSequence, List<T>> values) Creates a newOptionalValues
for the given type and values.Methods inherited from interface java.lang.Iterable
forEach, iterator, spliterator
Methods inherited from interface io.micronaut.core.value.OptionalValues
forEach, get, isEmpty, values
-
Field Details
-
EMPTY_VALUES
Constant for empty values.
-
-
Method Details
-
getFirst
Retrieve a value if it is present.- Parameters:
name
- The name of the value- Returns:
- An
Optional
of the value
-
empty
An emptyOptionalValues
.- Type Parameters:
T
- The generic type- Returns:
- The empty values
-
of
Creates a newOptionalValues
for the given type and values.- Type Parameters:
T
- The target generic type- Parameters:
values
- A map of values- Returns:
- The values
-