public interface ValueBuilder
Modifier and Type | Method and Description |
---|---|
<E> MutableBoundedValue<E> |
createBoundedValue(Key<MutableBoundedValue<E>> key,
E value,
Comparator<E> comparator,
E minimum,
E maximum)
Creates a
MutableBoundedValue for the provided Key with the provided
Comparator and E minimum and maximum values. |
<E> MutableBoundedValue<E> |
createBoundedValue(Key<MutableBoundedValue<E>> key,
E value,
Comparator<E> comparator,
E minimum,
E maximum,
E defaultElement)
Creates a
MutableBoundedValue for the provided Key with the provided
Comparator and E minimum and maximum values. |
<E> ListValue<E> |
createListValue(Key<ListValue<E>> key,
List<E> elements)
|
<E> ListValue<E> |
createListValue(Key<ListValue<E>> key,
List<E> elements,
List<E> defaults)
|
<K,V> MapValue<K,V> |
createMapValue(Key<MapValue<K,V>> key,
Map<K,V> map)
|
<K,V> MapValue<K,V> |
createMapValue(Key<MapValue<K,V>> key,
Map<K,V> map,
Map<K,V> defaults)
|
<E> OptionalValue<E> |
createOptionalValue(Key<OptionalValue<E>> key,
E element)
Creates an
OptionalValue where even the default value may be
Optional.absent() . |
<E> OptionalValue<E> |
createOptionalValue(Key<OptionalValue<E>> key,
E element,
E defaultElement)
Creates an
OptionalValue where the default is NOT
null , such that the actual value may be retained as
null . |
<E> SetValue<E> |
createSetValue(Key<SetValue<E>> key,
Set<E> elements)
|
<E> SetValue<E> |
createSetValue(Key<SetValue<E>> key,
Set<E> elements,
Set<E> defaults)
|
<E> Value<E> |
createValue(Key<Value<E>> key,
E element)
|
<E> Value<E> |
createValue(Key<Value<E>> key,
E element,
E defaultValue)
|
<E> Value<E> createValue(Key<Value<E>> key, E element)
E
- The type of elementkey
- The key for the valueelement
- The element<E> Value<E> createValue(Key<Value<E>> key, E element, E defaultValue)
E
- The type of elementkey
- The key for the valueelement
- The elementdefaultValue
- The default value<E> ListValue<E> createListValue(Key<ListValue<E>> key, List<E> elements)
E
- The type of elementkey
- The key for the valueelements
- The list of elements<E> ListValue<E> createListValue(Key<ListValue<E>> key, List<E> elements, List<E> defaults)
E
- The type of elementkey
- The key for the valueelements
- The list of elementsdefaults
- The default list<E> SetValue<E> createSetValue(Key<SetValue<E>> key, Set<E> elements)
E
- The type of elementkey
- The key for the valueelements
- The set of elements<E> SetValue<E> createSetValue(Key<SetValue<E>> key, Set<E> elements, Set<E> defaults)
E
- The type of elementkey
- The key for the valueelements
- The set of elementsdefaults
- The default set<K,V> MapValue<K,V> createMapValue(Key<MapValue<K,V>> key, Map<K,V> map)
K
- The type of keyV
- The type of valuekey
- The key for the valuemap
- The map of elements<K,V> MapValue<K,V> createMapValue(Key<MapValue<K,V>> key, Map<K,V> map, Map<K,V> defaults)
MapValue
of the provided Key
with the
types K
and V
along with the provided
Map
defaults.K
- The type of keyV
- The type of valuekey
- The key for the valuemap
- The map of elementsdefaults
- The default map<E> MutableBoundedValue<E> createBoundedValue(Key<MutableBoundedValue<E>> key, E value, Comparator<E> comparator, E minimum, E maximum)
MutableBoundedValue
for the provided Key
with the provided
Comparator
and E
minimum and maximum values.E
- The type of valuekey
- The key to the valuevalue
- The actual valuecomparator
- The comparatorminimum
- The minimum limitmaximum
- The maximum limit<E> MutableBoundedValue<E> createBoundedValue(Key<MutableBoundedValue<E>> key, E value, Comparator<E> comparator, E minimum, E maximum, E defaultElement)
MutableBoundedValue
for the provided Key
with the provided
Comparator
and E
minimum and maximum values.E
- The type of valuekey
- The key to the valuevalue
- The actual valuecomparator
- The comparatorminimum
- The minimum limitmaximum
- The maximum limitdefaultElement
- The default value<E> OptionalValue<E> createOptionalValue(Key<OptionalValue<E>> key, @Nullable E element)
OptionalValue
where even the default value may be
Optional.absent()
. These types of values should be restricted
to values that are live, that can be potentially large to retain a
reference to, and otherwise, not thread safe.E
- The type of elementkey
- The key to the valueelement
- The element, if available<E> OptionalValue<E> createOptionalValue(Key<OptionalValue<E>> key, @Nullable E element, E defaultElement)
OptionalValue
where the default is NOT
null
, such that the actual value may be retained as
null
.E
- The type of elementkey
- The key of the valueelement
- The elementdefaultElement
- The default value