Package io.micronaut.core.value
Class OptionalValuesMap<T>
java.lang.Object
io.micronaut.core.value.OptionalValuesMap<T>
- Type Parameters:
T
- the type
- All Implemented Interfaces:
OptionalValues<T>
,Iterable<CharSequence>
Default implementation of
OptionalValues
.- Since:
- 1.0
- Author:
- Graeme Rocher
-
Field Summary
Modifier and TypeFieldDescriptionprotected final ValueResolver
protected final Map<CharSequence,
?> Fields inherited from interface io.micronaut.core.value.OptionalValues
EMPTY_VALUES
-
Constructor Summary
ModifierConstructorDescriptionprotected
OptionalValuesMap
(Class<?> type, Map<CharSequence, ?> values) -
Method Summary
Modifier and TypeMethodDescriptionboolean
get
(CharSequence name) Retrieve a value if it is present.int
hashCode()
iterator()
values()
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
Methods inherited from interface io.micronaut.core.value.OptionalValues
forEach, isEmpty
-
Field Details
-
resolver
-
values
-
-
Constructor Details
-
OptionalValuesMap
- Parameters:
type
- The typevalues
- The values
-
-
Method Details
-
get
Description copied from interface:OptionalValues
Retrieve a value if it is present.- Specified by:
get
in interfaceOptionalValues<T>
- Parameters:
name
- The name of the value- Returns:
- An
Optional
of the value
-
values
- Specified by:
values
in interfaceOptionalValues<T>
- Returns:
- The values
-
iterator
-
equals
-
hashCode
public int hashCode()
-