| Modifier and Type | Class and Description |
|---|---|
class |
ConplierBean.ConsumeOnChangeListener
PropertyChangeListener delegates all value changes to parameterized Consumer |
| Constructor and Description |
|---|
ConplierBean()
Constructor creates a conplier bean without initial value;
|
ConplierBean(T initialValue)
Constructor creates a conplier bean with initial value;
|
| Modifier and Type | Method and Description |
|---|---|
void |
accept(T t) |
void |
addPropertyChangeListener(PropertyChangeListener propertyChangeListener) |
T |
binaryOperate(BinaryOperator<T> operator,
T secondOperand)
applies value of conplier bean as first operand and a parameterized second operand to an binary operator and returns operators result
|
ConplierBean<T> |
consume(Supplier<T> supplier)
set new value by supplier
|
ConplierBean.ConsumeOnChangeListener |
consumeOnChange(Consumer<T> consumer)
creates a
PropertyChangeListener delegates all value changes to parameterized Consumer |
void |
dispose()
Helps GC and make this ConplierBean unusable.
|
boolean |
equals(Object obj) |
T |
get() |
Optional<T> |
getOptional()
get value as
Optional |
T |
getValue()
bean like getter
|
int |
hashCode() |
void |
removePropertyChangeListener(PropertyChangeListener propertyChangeListener)
|
ConplierBean<T> |
setEqualsBySameValue(boolean equalsBySameValue)
Property for equals-behavior.
|
void |
setValue(T value)
bean like setter
|
ConplierBean<T> |
supply(Consumer<T> consumer)
supplies a consumer with value of conplier bean
|
boolean |
test(Predicate<T> predicate)
tests value of conplier bean by
Predicate |
T |
unaryOperate(UnaryOperator<T> operator)
applies value of conplier bean to an unary operator and returns operators result
|
public ConplierBean()
public ConplierBean(T initialValue)
initialValue - initial valuepublic void addPropertyChangeListener(PropertyChangeListener propertyChangeListener)
propertyChangeListener - PropertyChangeSupport.addPropertyChangeListener(PropertyChangeListener)public void removePropertyChangeListener(PropertyChangeListener propertyChangeListener)
propertyChangeListener - public T getValue()
public void setValue(T value)
value - public ConplierBean<T> supply(Consumer<T> consumer)
consumer - consume value of conplier beanpublic ConplierBean<T> consume(Supplier<T> supplier)
supplier - supplies to set new valuepublic T unaryOperate(UnaryOperator<T> operator)
operator - operator to apply value of conplier beanpublic T binaryOperate(BinaryOperator<T> operator, T secondOperand)
operator - operator to apply value of conplier bean as first operand and a second operandsecondOperand - second operandpublic boolean test(Predicate<T> predicate)
Predicatepredicate - predicate to test value of conplier beanpublic ConplierBean.ConsumeOnChangeListener consumeOnChange(Consumer<T> consumer)
PropertyChangeListener delegates all value changes to parameterized Consumerconsumer - consumer to consume all value changesConplierBean.ConsumeOnChangeListener to be able to stop consuming by ConplierBean.ConsumeOnChangeListener.unregister()public void dispose()
public ConplierBean<T> setEqualsBySameValue(boolean equalsBySameValue)
equalsBySameValue - if true, the equals method returns true, if other conplierBean wraps same object, therwise falseCopyright © 2020. All rights reserved.