- Type Parameters:
T
- the value type
public static interface Value.Builder<T>
Builds a
Value
instance.-
Method Summary
Modifier and TypeMethodDescriptionbuild()
initialValue
(T initialValue) Links the given value to the resulting valuelink
(ValueObserver<T> originalValue) Links the given value observer to the resulting valuenotify
(Value.Notify notify) validator
(Value.Validator<T> validator) Adds a validator to the resulting value
-
Method Details
-
initialValue
- Parameters:
initialValue
- the initial value- Returns:
- this builder instance
-
notify
- Parameters:
notify
- the notify policy for this value, defaultValue.Notify.WHEN_CHANGED
- Returns:
- this builder instance
-
validator
Adds a validator to the resulting value- Parameters:
validator
- the validator to add- Returns:
- this builder instance
-
link
Links the given value to the resulting value- Parameters:
originalValue
- the original value to link- Returns:
- this builder instance
- See Also:
-
link
Links the given value observer to the resulting value- Parameters:
originalValue
- the value to link- Returns:
- this builder instance
- See Also:
-
build
- Returns:
- a new
Value
instance based on this builder
-