views:

107

answers:

1

Is there a framework for synchronizing properties of POJOs? For example, I want to express (in some high-level, declarative form) that foo.text = bar.text + baz.text or foo.y = (max(bars, y)).y without having to register property change, element add and remove listeners on values and (especially) collections, which are repetitive and error-prone.

+2  A: 

javafx and it's bind operator. For example:

var x = 10;
var y = bind -x + 100;
assert y == 90;        // passes
y = 40;                // bind! 
assert x == 60;        // passes

for java take a look at JSR 295

dfa