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 BooleanExpression
and(BooleanExpression expression, ObservableValue<Boolean> other)
static BooleanExpression
and(BooleanExpression expression, Boolean constant)
static BooleanExpression
not(BooleanExpression expression)
static BooleanExpression
or(BooleanExpression expression, ObservableValue<Boolean> other)
static BooleanExpression
or(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
- theSupplier
to compute thevalue
.dependencies
- theObservableValue
s theexpression
depends on.
-
-
Method Detail
-
not
public static BooleanExpression not(BooleanExpression expression)
- Parameters:
expression
- theBooleanExpression
.- Returns:
- a new
BooleanExpression
holding the negation of thisvalue
.
-
and
public static BooleanExpression and(BooleanExpression expression, ObservableValue<Boolean> other)
- Parameters:
expression
- theBooleanExpression
.other
- theObservableValue
.- Returns:
- a new
BooleanExpression
holding the logical AND of thevalue
s from the givenObservableValue
s. - See Also:
BooleanExpression.and(ObservableValue)
-
and
public static BooleanExpression and(BooleanExpression expression, Boolean constant)
- Parameters:
expression
- theBooleanExpression
.constant
- the constantBoolean
value.- Returns:
- a new
BooleanExpression
holding the logical AND of thevalue
from the givenBooleanExpression
and the givenconstant
value.
-
or
public static BooleanExpression or(BooleanExpression expression, ObservableValue<Boolean> other)
- Parameters:
expression
- theBooleanExpression
.other
- the otherObservableValue
.- Returns:
- a new
BooleanExpression
holding the logical OR of thevalue
s from the givenObservableValue
s.
-
or
public static BooleanExpression or(BooleanExpression expression, Boolean other)
- Parameters:
expression
- theBooleanExpression
.other
- the constantBoolean
value.- Returns:
- a new
BooleanExpression
holding the logical OR of thevalue
from the givenBooleanExpression
and the givenconstant
value.
-
-