Not class
The Not decorator returns the opposite Status of its decorated Node instance.
- On
Status.success
, the Not decorator instance returnsStatus.failure
. - On
Status.failure
, the Not decorator instance returnsStatus.success
. - On
Status.running
, the Not decorator instance returnsStatus.running
This is the equivalent of a logical NOT on a boolean expression.
Constructors
- Not(Node node)
-
Construct a Not decorator for the specified argument Node.
The returned Status of the child Node will be inverted from
Status.success to Status.failure or from Status.failure to
Status.success. If the child Node returns Status.running the
Not decorator returns Status.running as it does consider that
status as an actual result.
const
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
reset(
) → void -
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
update(
) → Status -
Updates the decorated Node and returns the opposite Status. It
inverses
Status.success
intoStatus.failure
and vice-versa. If the decorated Node returnsStatus.running
, Not returnsStatus.running
.override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited