Added setObj() method.