---- Prev: BlocksInJavaCompositors Next: BlocksInJavaDiscussion Top: BlocksInJava ---- '''Putting It All Together''' ''revisit example...'' U''''''naryPredicate inRange = new B''''''inaryCompose( new And(), new U''''''naryPredicate() { public boolean is( Object arg ) { return ((Long)arg).longValue() >= LONG_START; } }, new U''''''naryPredicate() { public boolean is( Object arg ) { return ((Long)arg).longValue() < LONG_END; } } ); ''Build up expression dynamically, no anonymous-inners, no Java code, just instantiate objects and have inputs and outputs...'' ''break-down from binder and composer section...'' 1. A := '''Greater'''.is( 10, LONG_START ) 1. B := '''Equal'''.is( 10, LONG_START ) 1. C := '''Or'''.is( ''A'', ''B'' ) 1. D := '''Less'''.is( 10, LONG_END ) 1. E := '''And'''.is( ''C'', ''D'' ) ''rewritten as objects with inputs and no manual code...'' 1. A = new B''''''inderSecond( new '''Greater'''(), LONG_START ) 1. B = new B''''''inderSecond( new '''Equal'''(), LONG_START ) 1. C = new B''''''inaryCompose( new '''Or'''(), A, B ) 1. D = new B''''''inderSecond( new '''Less'''(), LONG_START ) 1. E = new B''''''inaryCompose( new '''And'''(), C, D ) * E.is( new Long( 10 ) ) ''-- RobertDiFalco'' ---- Prev: BlocksInJavaCompositors Next: BlocksInJavaDiscussion Top: BlocksInJava