MetaDone
metadone.publish_subscribe.EventTowerEq< M > Class Reference
Inheritance diagram for metadone.publish_subscribe.EventTowerEq< M >:
Collaboration diagram for metadone.publish_subscribe.EventTowerEq< M >:

List of all members.

Classes

class  NodeEq

Protected Member Functions

NodeEq createNode (Class<?> cl)

Detailed Description

Extension of the normal event tower to optimize the use of MapFcts.Equal as the predicate.

This is based on the fact that most of the predicate test if a property of the event is equal to some expected value.

Some usage patterns:

 EventTowerEq<Object> tower;
 tower.subscribe(subscriber, List.class, new MapFct<Collection, Boolean> {
   public Boolean map(Collection l) { return !l.isEmpty(); }
 });
 tower.subscribe(subscriber, SomeEnum.class, MapFcts.equal(SomeEnum.VALUE));
 tower.subscribe(subscriber, SomeObject.class, MapFcts.equal(
   new MapFct<SomeObject, SomeEnum> {
     public SomeEnum map(SomeObject obj) { return obj.getType(); }
   }, SomeEnum.VALUE));
 
Author:
kmagusia

Member Function Documentation

NodeEq metadone.publish_subscribe.EventTowerEq< M >.createNode ( Class<?>  cl) [protected]

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Enumerations