title: `*this = rhs` in Java?
body: <p>I'm coming from the C++ world and I can't find what is the Java alternative (if any) to the following:</p>
  
  <pre><code>struct SomeStruct
  {
      SomeStruct(){}
      SomeStruct(const SomeStruct&amp; rhs)
      {
          *this = rhs;
      }
  };
  </code></pre>
  
  <p>The reason why I need this is that I have a cache of existing objects, so I don't want to create another instance but just to 'clone' the existing one, something like this:</p>
  
  <pre><code>public class SomeObject
  {
      private static Hashtable _objects;
      SomeObject()
      {
          SomeObject obj = _objects.get(some_key);
          if (obj != null) {
              // *this = obj;
              // instead of: 
              // this.something = obj.something;
              // this.something1 = obj.something1;
              // this.something2 = obj.something2;
              // a zillion fields....
          }
      }
  };
  </code></pre>
  
  <p>EDIT:</p>
  
  <p>Sorry, I confused some things (still need to learn both Java and C++).</p>
  
  <p>Thank You</p>