Class BooleanBinding
- 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<Boolean>
-
- io.github.mmm.value.observable.booleans.BooleanBinding
-
- All Implemented Interfaces:
EventSource<ObservableEvent<Boolean>,ObservableEventListener<? super Boolean>>,BooleanExpression,ObservableBooleanValue,ReadableBooleanValue,Expression<Boolean>,ObservableSimpleValue<Boolean>,ReadableSimpleValue<Boolean>,ObservableValue<Boolean>,ReadableTypedValue<Boolean>,ReadableValue<Boolean>,Supplier<Boolean>
public class BooleanBinding extends Binding<Boolean> implements BooleanExpression
- Since:
- 1.0.0
- See Also:
Binding,BooleanExpression
-
-
Constructor Summary
Constructors Constructor Description BooleanBinding(Supplier<? extends Boolean> expression, ObservableValue<?>... dependencies)The constructor.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static BooleanExpressionand(BooleanExpression expression, ObservableValue<Boolean> other)static BooleanExpressionand(BooleanExpression expression, Boolean constant)static BooleanExpressionnot(BooleanExpression expression)static BooleanExpressionor(BooleanExpression expression, ObservableValue<Boolean> other)static BooleanExpressionor(BooleanExpression expression, Boolean other)-
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.booleans.BooleanExpression
and, and, not, or, or
-
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.ObservableValue
toString
-
Methods inherited from interface io.github.mmm.value.observable.booleans.ReadableBooleanValue
getSafe, getValue, getValueClass
-
Methods inherited from interface io.github.mmm.value.observable.object.ReadableSimpleValue
getAsString
-
Methods inherited from interface io.github.mmm.value.ReadableValue
get
-
-
-
-
Constructor Detail
-
BooleanBinding
public BooleanBinding(Supplier<? extends Boolean> expression, ObservableValue<?>... dependencies)
The constructor.- Parameters:
expression- theSupplierto compute thevalue.dependencies- theObservableValues theexpressiondepends on.
-
-
Method Detail
-
not
public static BooleanExpression not(BooleanExpression expression)
- Parameters:
expression- theBooleanExpression.- Returns:
- a new
BooleanExpressionholding the negation of thisvalue.
-
and
public static BooleanExpression and(BooleanExpression expression, ObservableValue<Boolean> other)
- Parameters:
expression- theBooleanExpression.other- theObservableValue.- Returns:
- a new
BooleanExpressionholding the logical AND of thevalues from the givenObservableValues. - See Also:
BooleanExpression.and(ObservableValue)
-
and
public static BooleanExpression and(BooleanExpression expression, Boolean constant)
- Parameters:
expression- theBooleanExpression.constant- the constantBooleanvalue.- Returns:
- a new
BooleanExpressionholding the logical AND of thevaluefrom the givenBooleanExpressionand the givenconstantvalue.
-
or
public static BooleanExpression or(BooleanExpression expression, ObservableValue<Boolean> other)
- Parameters:
expression- theBooleanExpression.other- the otherObservableValue.- Returns:
- a new
BooleanExpressionholding the logical OR of thevalues from the givenObservableValues.
-
or
public static BooleanExpression or(BooleanExpression expression, Boolean other)
- Parameters:
expression- theBooleanExpression.other- the constantBooleanvalue.- Returns:
- a new
BooleanExpressionholding the logical OR of thevaluefrom the givenBooleanExpressionand the givenconstantvalue.
-
-