can I define setter method to return this rather than void?
Like:
ClassA setItem1() { return this; } ClassA setItem2() { return this; }
Yes. This is a somewhat common technique called Method Chaining, and can be used to create a "fluent interface".
See: http://en.wikipedia.org/wiki/Method_chaining, http://en.wikipedia.org/wiki/Fluent_interface