Hello,

how about having setters returnig 'this'?

In my unittests I have to create a lot of dummy structures. Currently I create 
them in the 'setUp()' method eaven when the structure is shared by all the 
tests. 

If setters would return 'this' I could initialize Constants like this:

RootNode rn = new RootNode()
  .setContainer1(
     new Container1().setContainee(new Containee()))
  .setContainer2(new Container1())....

I'd love not to have to create a bunch "one time references" to create a 
Structure of castor objects.

bye
Thomas
---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to