Rules

The Rules style of composition uses the $ operator representing the connector to implement the following compositions


 * SourceName -> SinkName $ Rule (parameterList[opt])
 * SourceName -> HandlerName $ Rule(parameterList[opt]) -> SinkName $ Rule(parameterList[opt])
 * SourceName -> HandlerName $ Rule(parameterList[opt]) -> SinkName
 * result = SourceName -> HandlerName $ Rule(parameterList[opt])

All combinations of components in the pipes and filter style can be qualified with a rule evaluation.

Component RuleTester {

Rule rule = boolean test; //will work Rule rule = void test; //won't work - rule will always return boolean Rule rule = int test(int num); //won't work - rule will always return boolean Rule rule = boolean test(int num); //will work Rule rule = public boolean test(int num); //won't work - no modifiers are allowed

Source src = int producer; Handler hnd = int processor(int number); Sink snk = void pit(int finalnumber); Event evt = boolean trigger;

}

Next : Rule test cases