title: Copy object into another
body: <p>Is there a generic way to achieve copying an existing object into another?</p>
  
  <p>Assume <code>MyObj</code> has an <code>id</code> and <code>name</code> fields.  Like this:</p>
  
  <pre><code>MyObj myObj_1 = new MyObj(1, "Name 1");
  MyObj myObj_2 = new MyObj(2, "Name 2");
  </code></pre>
  
  <p>Instead of</p>
  
  <pre><code>myObj_2.setName(myObj_1.getName()) // etc for each field
  </code></pre>
  
  <p>do something as following:</p>
  
  <pre><code>myObj_2.copyFrom(myObj_1)
  </code></pre>
  
  <p>so that they are different instances, but have equal properties.</p>