Abstract base class for all DataNode types. It stores data of type
argument T. Concrete instances can be shared across multiple DataNode instances by reference in
order to compose operations that read/write from the same data.
A DataSubject is a Subject whose notifier is a DataNode. It provides
access to the DataNodedata through a getter. A DataSubject observer
can therefore receive data through a notification.
An Evaluator instance updates its children nodes as an unordered sequence.
Composite child nodes will be updated until they return Status.success,
then they are ignored in any future calls update() method of the
Evaluator until all other children nodes have returned Status.success.
An Identity exists solely to return the specified argument Status from
its update() method. An Identity compares equal to another Identity if
they are both constructed with the same Status.
The Observer class can subscribe to one or more Subject instances. It
uses its argument handlerFunction in its receive(subject) method in
order to handle any notifications.
A Selector evaluates its composite nodes sequentially expecting one of
them to return Status.success, in which case the Selector returns
Status.success.
A Sequence evaluates its composite nodes sequentially expecting all of
them to return Status.success, in which case the Selector returns
Status.success.
The Subject class has notifierNode and a notificationsList. The
notifier is updated and if its Status is part of notifications, the
Subject notifies any subscribed Observer.
Creates a Closure instance for the specified Function argument returning
a predetermined Status value. The default predetermined Status is
Status.success.