Class LongBinding
- 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<Long>
-
- io.github.mmm.value.observable.number.longs.LongBinding
-
- All Implemented Interfaces:
EventSource<ObservableEvent<Long>,ObservableEventListener<? super Long>>,ComparableExpression<Long>,Expression<Long>,LongExpression,ObservableLongValue,ReadableLongValue,NumberExpression<Long>,ObservableNumberValue<Long>,ReadableNumberValue<Long>,ObservableSimpleValue<Long>,ReadableSimpleValue<Long>,ObservableValue<Long>,ReadableTypedValue<Long>,ReadableValue<Long>,Supplier<Long>
public class LongBinding extends NumberBinding<Long> implements LongExpression
- Since:
- 1.0.0
-
-
Constructor Summary
Constructors Constructor Description LongBinding(Supplier<Long> 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.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.longs.LongExpression
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, 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
-
Methods inherited from interface io.github.mmm.value.observable.number.NumberExpression
add, add, add, add, divide, divide, divide, divide, multiply, multiply, multiply, multiply, subtract, subtract, subtract, subtract
-
Methods inherited from interface io.github.mmm.value.observable.ObservableValue
toString
-
Methods inherited from interface io.github.mmm.value.observable.number.longs.ReadableLongValue
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
-
LongBinding
public LongBinding(Supplier<Long> expression, ObservableValue<?>... dependencies)
The constructor.- Parameters:
expression- theSupplierto compute thevalue.dependencies- theObservableValues theexpressiondepends on.
-
-
Method Detail
-
negate
public static LongExpression negate(LongExpression expression)
- Parameters:
expression- theLongExpressionto negate.- Returns:
- a new
LongExpressionholding the negation of thevaluefrom the givenLongExpression. - See Also:
NumberExpression.negate()
-
cast
public static LongExpression cast(NumberExpression<?> expression)
- Parameters:
expression- theNumberExpressionto convert.- Returns:
- the given
NumberExpressionconverted to aLongExpression.
-
add
public static LongExpression add(NumberExpression<?> expression, ObservableValue<? extends Number> other)
- Parameters:
expression- theLongExpressionto add.other- theObservableValueto add.- Returns:
- a new
LongExpressionholding the sum of thevalues of the first and the second givenObservableValues. - See Also:
NumberExpression.add(ObservableLongValue)
-
add
public static LongExpression add(NumberExpression<?> expression, Number constant)
- Parameters:
expression- theLongExpressionto add.constant- the constantNumberto add.- Returns:
- a new
LongExpressionholding the sum of thevaluefrom the givenLongExpressionwith the givenconstant. - See Also:
NumberExpression.add(ObservableLongValue)
-
add
public static LongExpression add(NumberExpression<?> expression, long constant)
- Parameters:
expression- theLongExpressionto add.constant- the constantlongto add.- Returns:
- a new
LongExpressionholding the sum of thevaluefrom the givenLongExpressionwith the givenconstant. - See Also:
NumberExpression.add(ObservableLongValue)
-
addAll
@SafeVarargs public static LongExpression addAll(ObservableValue<? extends Number>... observables)
- Parameters:
observables- theObservableValues to add.- Returns:
- a new
LongExpressionholding the sum of thevalues from the givenObservableValues.
-
subtract
public static LongExpression subtract(NumberExpression<?> expression, ObservableValue<? extends Number> other)
- Parameters:
expression- theLongExpression.other- theObservableValueto subtract.- Returns:
- a new
LongExpressionholding the difference of thevalues of the first and the second givenObservableValues. - See Also:
NumberExpression.subtract(ObservableLongValue)
-
subtract
public static LongExpression subtract(NumberExpression<?> expression, Number constant)
- Parameters:
expression- theLongExpression.constant- the constantNumberto subtract.- Returns:
- a new
LongExpressionholding the difference of thevaluefrom the givenLongExpressionwith the givenconstant. - See Also:
NumberExpression.subtract(ObservableLongValue)
-
subtract
public static LongExpression subtract(NumberExpression<?> expression, long constant)
- Parameters:
expression- theLongExpression.constant- the constantlongto subtract.- Returns:
- a new
LongExpressionholding the difference of thevaluefrom the givenLongExpressionwith the givenconstant. - See Also:
NumberExpression.subtract(ObservableLongValue)
-
subtractAll
@SafeVarargs public static LongExpression subtractAll(ObservableValue<? extends Number>... observables)
- Parameters:
observables- theObservableValues to subtract.- Returns:
- a new
LongExpressionholding the difference of thevalues from the givenObservableValues.
-
multiply
public static LongExpression multiply(NumberExpression<?> expression, ObservableValue<? extends Number> other)
- Parameters:
expression- theLongExpression.other- theObservableValueto multiply.- Returns:
- a new
LongExpressionholding the product of thevalues of the first and the second givenObservableValues. - See Also:
NumberExpression.multiply(ObservableLongValue)
-
multiply
public static LongExpression multiply(NumberExpression<?> expression, Number constant)
- Parameters:
expression- theLongExpression.constant- the constantNumberto multiply.- Returns:
- a new
LongExpressionholding the product of thevaluefrom the givenLongExpressionmultiplied with the givenconstant. - See Also:
NumberExpression.multiply(ObservableLongValue)
-
multiply
public static LongExpression multiply(NumberExpression<?> expression, long constant)
- Parameters:
expression- theLongExpression.constant- the constantlongto multiply.- Returns:
- a new
LongExpressionholding the product of thevaluefrom the givenLongExpressionmultiplied with the givenconstant. - See Also:
NumberExpression.multiply(ObservableLongValue)
-
multiplyAll
@SafeVarargs public static LongExpression multiplyAll(ObservableValue<? extends Number>... observables)
- Parameters:
observables- theObservableValues to multiply.- Returns:
- a new
LongExpressionholding the product of thevalues from the givenObservableValues.
-
divide
public static LongExpression divide(NumberExpression<?> expression, ObservableValue<? extends Number> other)
- Parameters:
expression- theLongExpression.other- theObservableValueto divide.- Returns:
- a new
LongExpressionholding the quotient of thevalues of the first and the second givenObservableValues. - See Also:
NumberExpression.divide(ObservableLongValue)
-
divide
public static LongExpression divide(NumberExpression<?> expression, Number constant)
- Parameters:
expression- theLongExpression.constant- the constantNumberto divide.- Returns:
- a new
LongExpressionholding the quotient of thevaluefrom the givenLongExpressiondivided by the givenconstant. - See Also:
NumberExpression.divide(ObservableLongValue)
-
divide
public static LongExpression divide(NumberExpression<?> expression, long constant)
- Parameters:
expression- theLongExpression.constant- the constantlongto divide.- Returns:
- a new
LongExpressionholding the quotient of thevaluefrom the givenLongExpressiondivided by the givenconstant. - See Also:
NumberExpression.divide(ObservableLongValue)
-
divideAll
@SafeVarargs public static LongExpression divideAll(ObservableValue<? extends Number>... observables)
- Parameters:
observables- theObservableValues to divide.- Returns:
- a new
LongExpressionholding the quotient of thevalues from the givenObservableValues.
-
-