Interface Value.Builder<T, B extends Value.Builder<T,B>>
- Type Parameters:
T- the value typeB- the builder type
- All Superinterfaces:
Observer.Builder<T,B>
- All Known Subinterfaces:
ValueCollection.Builder<T,C, B>, ValueList.Builder<T>, ValueSet.Builder<T>
- All Known Implementing Classes:
AbstractValue.AbstractBuilder
public static interface Value.Builder<T, B extends Value.Builder<T,B>>
extends Observer.Builder<T,B>
Builds a
Value instance.-
Method Summary
Modifier and TypeMethodDescriptionbuild()changeConsumer(Consumer<Change<T>> consumer) changeListener(Runnable listener) link(Observable<T> observable) Links the given observable to the resulting valueLinks the given value to the resulting valuelocked(boolean locked) notify(Value.Notify notify) validator(Value.Validator<? super T> validator) Adds a validator to the resulting valueweakChangeConsumer(Consumer<Change<T>> weakConsumer) weakChangeListener(Runnable weakListener) Methods inherited from interface Observer.Builder
consumer, listener, weakConsumer, weakListener, when, when, when, when
-
Method Details
-
value
-
notify
- Parameters:
notify- the notify policy for this value, defaultValue.Notify.CHANGED- Returns:
- this builder instance
-
validator
Adds a validator to the resulting value- Parameters:
validator- the validator to add- Returns:
- this builder instance
-
locked
- Parameters:
locked- true if the value should be locked- Returns:
- this builder instance
- See Also:
-
link
-
link
Links the given observable to the resulting value- Parameters:
observable- the value to link- Returns:
- this builder instance
- See Also:
-
changeListener
-
changeConsumer
-
weakChangeListener
-
weakChangeConsumer
-
build
- Specified by:
buildin interfaceObserver.Builder<T, B extends Value.Builder<T,B>> - Returns:
- a new
Valueinstance based on this builder
-