added dict-to-object and object-to-dict methods (java)