Class DoubleBinding
- java.lang.Object
-
- io.github.mmm.event.AbstractEventSource<ObservableEvent<V>,ObservableEventListener<? super V>>
-
- io.github.mmm.value.observable.AbstractObservableValue<V>
-
- io.github.mmm.value.observable.Binding<N>
-
- io.github.mmm.value.observable.number.NumberBinding<Double>
-
- io.github.mmm.value.observable.number.doubles.DoubleBinding
-
- All Implemented Interfaces:
EventSource<ObservableEvent<Double>,ObservableEventListener<? super Double>>,ComparableExpression<Double>,Expression<Double>,DoubleExpression,ObservableDoubleValue,ReadableDoubleValue,NumberExpression<Double>,ObservableNumberValue<Double>,ReadableNumberValue<Double>,ObservableSimpleValue<Double>,ReadableSimpleValue<Double>,ObservableValue<Double>,ReadableTypedValue<Double>,ReadableValue<Double>,Supplier<Double>
public class DoubleBinding extends NumberBinding<Double> implements DoubleExpression
- Since:
- 1.0.0
-
-
Constructor Summary
Constructors Constructor Description DoubleBinding(Supplier<Double> expression, ObservableValue<?>... dependencies)The constructor.
-
Method Summary
-
Methods inherited from class io.github.mmm.value.observable.Binding
bind, dispose, get, invalidate, isValid, toString, unbind
-
Methods inherited from class io.github.mmm.value.observable.AbstractObservableValue
addListener, fireChange, fireEvent, fireEvent, fireEventFor, fireEventFor, fireEventWithOldValue, hasChangeAwareListeners, removeListener, toString
-
Methods inherited from class io.github.mmm.event.AbstractEventSource
getEventAdapter, hasListeners
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface io.github.mmm.value.observable.comparable.ComparableExpression
greaterThan, greaterThan, greaterThanOrEqualTo, greaterThanOrEqualTo, lessThan, lessThan, lessThanOrEqualTo, lessThanOrEqualTo
-
Methods inherited from interface io.github.mmm.value.observable.number.doubles.DoubleExpression
add, add, add, add, add, add, add, add, add, add, add, add, add, add, add, add, divide, divide, divide, divide, divide, divide, divide, divide, divide, divide, divide, divide, divide, divide, divide, divide, multiply, multiply, multiply, multiply, multiply, multiply, multiply, multiply, multiply, multiply, multiply, multiply, multiply, multiply, multiply, multiply, negate, subtract, subtract, subtract, subtract, subtract, subtract, subtract, subtract, subtract, subtract, subtract, subtract, subtract, subtract, subtract, subtract
-
Methods inherited from interface io.github.mmm.event.EventSource
addListener, addListener, addWeakListener, removeListener
-
Methods inherited from interface io.github.mmm.value.observable.Expression
asString, dispose, isEqualTo, isEqualTo, isNotEqualTo, isNotEqualTo, isNotNull, isNull
-
Methods inherited from interface io.github.mmm.value.observable.number.NumberExpression
add, add, divide, divide, multiply, multiply, subtract, subtract
-
Methods inherited from interface io.github.mmm.value.observable.ObservableValue
toString
-
Methods inherited from interface io.github.mmm.value.observable.number.doubles.ReadableDoubleValue
getSafe, getValue, getValueClass
-
Methods inherited from interface io.github.mmm.value.observable.number.ReadableNumberValue
byteValue, doubleValue, floatValue, intValue, longValue, shortValue
-
Methods inherited from interface io.github.mmm.value.observable.object.ReadableSimpleValue
getAsString
-
Methods inherited from interface io.github.mmm.value.ReadableValue
get
-
-
-
-
Constructor Detail
-
DoubleBinding
public DoubleBinding(Supplier<Double> expression, ObservableValue<?>... dependencies)
The constructor.- Parameters:
expression- theSupplierto compute thevalue.dependencies- theObservableValues theexpressiondepends on.
-
-
Method Detail
-
negate
public static DoubleExpression negate(DoubleExpression expression)
- Parameters:
expression- theDoubleExpressionto negate.- Returns:
- a new
DoubleExpressionholding the negation of thevaluefrom the givenDoubleExpression. - See Also:
NumberExpression.negate()
-
cast
public static DoubleExpression cast(NumberExpression<?> expression)
- Parameters:
expression- theNumberExpressionto convert.- Returns:
- the given
NumberExpressionconverted to aDoubleExpression.
-
add
public static DoubleExpression add(NumberExpression<?> expression, ObservableValue<? extends Number> other)
- Parameters:
expression- theDoubleExpressionto add.other- theObservableValueto add.- Returns:
- a new
DoubleExpressionholding the sum of thevalues of the first and the second givenObservableValues. - See Also:
NumberExpression.add(ObservableDoubleValue)
-
add
public static DoubleExpression add(NumberExpression<?> expression, Number constant)
- Parameters:
expression- theDoubleExpressionto add.constant- the constantNumberto add.- Returns:
- a new
DoubleExpressionholding the sum of thevaluefrom the givenDoubleExpressionwith the givenconstant. - See Also:
NumberExpression.add(ObservableDoubleValue)
-
add
public static DoubleExpression add(NumberExpression<?> expression, double constant)
- Parameters:
expression- theDoubleExpressionto add.constant- the constantdoubleto add.- Returns:
- a new
DoubleExpressionholding the sum of thevaluefrom the givenDoubleExpressionwith the givenconstant. - See Also:
NumberExpression.add(ObservableDoubleValue)
-
addAll
@SafeVarargs public static DoubleExpression addAll(ObservableValue<? extends Number>... observables)
- Parameters:
observables- theObservableValues to add.- Returns:
- a new
DoubleExpressionholding the sum of thevalues from the givenObservableValues.
-
subtract
public static DoubleExpression subtract(NumberExpression<?> expression, ObservableValue<? extends Number> other)
- Parameters:
expression- theDoubleExpression.other- theObservableValueto subtract.- Returns:
- a new
DoubleExpressionholding the difference of thevalues of the first and the second givenObservableValues. - See Also:
NumberExpression.subtract(ObservableDoubleValue)
-
subtract
public static DoubleExpression subtract(NumberExpression<?> expression, Number constant)
- Parameters:
expression- theDoubleExpression.constant- the constantNumberto subtract.- Returns:
- a new
DoubleExpressionholding the difference of thevaluefrom the givenDoubleExpressionwith the givenconstant. - See Also:
NumberExpression.subtract(ObservableDoubleValue)
-
subtract
public static DoubleExpression subtract(NumberExpression<?> expression, double constant)
- Parameters:
expression- theDoubleExpression.constant- the constantdoubleto subtract.- Returns:
- a new
DoubleExpressionholding the difference of thevaluefrom the givenDoubleExpressionwith the givenconstant. - See Also:
NumberExpression.subtract(ObservableDoubleValue)
-
subtractAll
@SafeVarargs public static DoubleExpression subtractAll(ObservableValue<? extends Number>... observables)
- Parameters:
observables- theObservableValues to subtract.- Returns:
- a new
DoubleExpressionholding the difference of thevalues from the givenObservableValues.
-
multiply
public static DoubleExpression multiply(NumberExpression<?> expression, ObservableValue<? extends Number> other)
- Parameters:
expression- theDoubleExpression.other- theObservableValueto multiply.- Returns:
- a new
DoubleExpressionholding the product of thevalues of the first and the second givenObservableValues. - See Also:
NumberExpression.multiply(ObservableDoubleValue)
-
multiply
public static DoubleExpression multiply(NumberExpression<?> expression, Number constant)
- Parameters:
expression- theDoubleExpression.constant- the constantNumberto multiply.- Returns:
- a new
DoubleExpressionholding the product of thevaluefrom the givenDoubleExpressionmultiplied with the givenconstant. - See Also:
NumberExpression.multiply(ObservableDoubleValue)
-
multiply
public static DoubleExpression multiply(NumberExpression<?> expression, double constant)
- Parameters:
expression- theDoubleExpression.constant- the constantdoubleto multiply.- Returns:
- a new
DoubleExpressionholding the product of thevaluefrom the givenDoubleExpressionmultiplied with the givenconstant. - See Also:
NumberExpression.multiply(ObservableDoubleValue)
-
multiplyAll
@SafeVarargs public static DoubleExpression multiplyAll(ObservableValue<? extends Number>... observables)
- Parameters:
observables- theObservableValues to multiply.- Returns:
- a new
DoubleExpressionholding the product of thevalues from the givenObservableValues.
-
divide
public static DoubleExpression divide(NumberExpression<?> expression, ObservableValue<? extends Number> other)
- Parameters:
expression- theDoubleExpression.other- theObservableValueto divide.- Returns:
- a new
DoubleExpressionholding the quotient of thevalues of the first and the second givenObservableValues. - See Also:
NumberExpression.divide(ObservableDoubleValue)
-
divide
public static DoubleExpression divide(NumberExpression<?> expression, Number constant)
- Parameters:
expression- theDoubleExpression.constant- the constantNumberto divide.- Returns:
- a new
DoubleExpressionholding the quotient of thevaluefrom the givenDoubleExpressiondivided by the givenconstant. - See Also:
NumberExpression.divide(ObservableDoubleValue)
-
divide
public static DoubleExpression divide(NumberExpression<?> expression, double constant)
- Parameters:
expression- theDoubleExpression.constant- the constantdoubleto divide.- Returns:
- a new
DoubleExpressionholding the quotient of thevaluefrom the givenDoubleExpressiondivided by the givenconstant. - See Also:
NumberExpression.divide(ObservableDoubleValue)
-
divideAll
@SafeVarargs public static DoubleExpression divideAll(ObservableValue<? extends Number>... observables)
- Parameters:
observables- theObservableValues to divide.- Returns:
- a new
DoubleExpressionholding the quotient of thevalues from the givenObservableValues.
-
-