Class ByteBinding
- 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<Byte>
-
- io.github.mmm.value.observable.number.bytes.ByteBinding
-
- All Implemented Interfaces:
EventSource<ObservableEvent<Byte>,ObservableEventListener<? super Byte>>
,ComparableExpression<Byte>
,Expression<Byte>
,ByteExpression
,ObservableByteValue
,ReadableByteValue
,NumberExpression<Byte>
,ObservableNumberValue<Byte>
,ReadableNumberValue<Byte>
,ObservableSimpleValue<Byte>
,ReadableSimpleValue<Byte>
,ObservableValue<Byte>
,ReadableTypedValue<Byte>
,ReadableValue<Byte>
,Supplier<Byte>
public class ByteBinding extends NumberBinding<Byte> implements ByteExpression
- Since:
- 1.0.0
-
-
Constructor Summary
Constructors Constructor Description ByteBinding(Supplier<Byte> 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.number.bytes.ByteExpression
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.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.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.bytes.ReadableByteValue
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
-
ByteBinding
public ByteBinding(Supplier<Byte> expression, ObservableValue<?>... dependencies)
The constructor.- Parameters:
expression
- theSupplier
to compute thevalue
.dependencies
- theObservableValue
s theexpression
depends on.
-
-
Method Detail
-
negate
public static ByteExpression negate(ByteExpression expression)
- Parameters:
expression
- theByteExpression
to negate.- Returns:
- a new
ByteExpression
holding the negation of thevalue
from the givenByteExpression
. - See Also:
NumberExpression.negate()
-
cast
public static ByteExpression cast(NumberExpression<?> expression)
- Parameters:
expression
- theNumberExpression
to convert.- Returns:
- the given
NumberExpression
converted to aByteExpression
.
-
add
public static ByteExpression add(NumberExpression<?> expression, ObservableValue<? extends Number> other)
- Parameters:
expression
- theByteExpression
to add.other
- theObservableValue
to add.- Returns:
- a new
ByteExpression
holding the sum of thevalue
s of the first and the second givenObservableValue
s. - See Also:
NumberExpression.add(ObservableByteValue)
-
add
public static ByteExpression add(NumberExpression<?> expression, Number constant)
- Parameters:
expression
- theByteExpression
to add.constant
- the constantNumber
to add.- Returns:
- a new
ByteExpression
holding the sum of thevalue
from the givenByteExpression
with the givenconstant
. - See Also:
NumberExpression.add(ObservableByteValue)
-
add
public static ByteExpression add(NumberExpression<?> expression, byte constant)
- Parameters:
expression
- theByteExpression
to add.constant
- the constantbyte
to add.- Returns:
- a new
ByteExpression
holding the sum of thevalue
from the givenByteExpression
with the givenconstant
. - See Also:
NumberExpression.add(ObservableByteValue)
-
addAll
@SafeVarargs public static ByteExpression addAll(ObservableValue<? extends Number>... observables)
- Parameters:
observables
- theObservableValue
s to add.- Returns:
- a new
ByteExpression
holding the sum of thevalue
s from the givenObservableValue
s.
-
subtract
public static ByteExpression subtract(NumberExpression<?> expression, ObservableValue<? extends Number> other)
- Parameters:
expression
- theByteExpression
.other
- theObservableValue
to subtract.- Returns:
- a new
ByteExpression
holding the difference of thevalue
s of the first and the second givenObservableValue
s. - See Also:
NumberExpression.subtract(ObservableByteValue)
-
subtract
public static ByteExpression subtract(NumberExpression<?> expression, Number constant)
- Parameters:
expression
- theByteExpression
.constant
- the constantNumber
to subtract.- Returns:
- a new
ByteExpression
holding the difference of thevalue
from the givenByteExpression
with the givenconstant
. - See Also:
NumberExpression.subtract(ObservableByteValue)
-
subtract
public static ByteExpression subtract(NumberExpression<?> expression, byte constant)
- Parameters:
expression
- theByteExpression
.constant
- the constantbyte
to subtract.- Returns:
- a new
ByteExpression
holding the difference of thevalue
from the givenByteExpression
with the givenconstant
. - See Also:
NumberExpression.subtract(ObservableByteValue)
-
subtractAll
@SafeVarargs public static ByteExpression subtractAll(ObservableValue<? extends Number>... observables)
- Parameters:
observables
- theObservableValue
s to subtract.- Returns:
- a new
ByteExpression
holding the difference of thevalue
s from the givenObservableValue
s.
-
multiply
public static ByteExpression multiply(NumberExpression<?> expression, ObservableValue<? extends Number> other)
- Parameters:
expression
- theByteExpression
.other
- theObservableValue
to multiply.- Returns:
- a new
ByteExpression
holding the product of thevalue
s of the first and the second givenObservableValue
s. - See Also:
NumberExpression.multiply(ObservableByteValue)
-
multiply
public static ByteExpression multiply(NumberExpression<?> expression, Number constant)
- Parameters:
expression
- theByteExpression
.constant
- the constantNumber
to multiply.- Returns:
- a new
ByteExpression
holding the product of thevalue
from the givenByteExpression
multiplied with the givenconstant
. - See Also:
NumberExpression.multiply(ObservableByteValue)
-
multiply
public static ByteExpression multiply(NumberExpression<?> expression, byte constant)
- Parameters:
expression
- theByteExpression
.constant
- the constantbyte
to multiply.- Returns:
- a new
ByteExpression
holding the product of thevalue
from the givenByteExpression
multiplied with the givenconstant
. - See Also:
NumberExpression.multiply(ObservableByteValue)
-
multiplyAll
@SafeVarargs public static ByteExpression multiplyAll(ObservableValue<? extends Number>... observables)
- Parameters:
observables
- theObservableValue
s to multiply.- Returns:
- a new
ByteExpression
holding the product of thevalue
s from the givenObservableValue
s.
-
divide
public static ByteExpression divide(NumberExpression<?> expression, ObservableValue<? extends Number> other)
- Parameters:
expression
- theByteExpression
.other
- theObservableValue
to divide.- Returns:
- a new
ByteExpression
holding the quotient of thevalue
s of the first and the second givenObservableValue
s. - See Also:
NumberExpression.divide(ObservableByteValue)
-
divide
public static ByteExpression divide(NumberExpression<?> expression, Number constant)
- Parameters:
expression
- theByteExpression
.constant
- the constantNumber
to divide.- Returns:
- a new
ByteExpression
holding the quotient of thevalue
from the givenByteExpression
divided by the givenconstant
. - See Also:
NumberExpression.divide(ObservableByteValue)
-
divide
public static ByteExpression divide(NumberExpression<?> expression, byte constant)
- Parameters:
expression
- theByteExpression
.constant
- the constantbyte
to divide.- Returns:
- a new
ByteExpression
holding the quotient of thevalue
from the givenByteExpression
divided by the givenconstant
. - See Also:
NumberExpression.divide(ObservableByteValue)
-
divideAll
@SafeVarargs public static ByteExpression divideAll(ObservableValue<? extends Number>... observables)
- Parameters:
observables
- theObservableValue
s to divide.- Returns:
- a new
ByteExpression
holding the quotient of thevalue
s from the givenObservableValue
s.
-
-