Can you force java to return an object by value?
<p>In Java, can one force a method to return by value (not by reference)?</p>

<p>For example:</p>

<pre><code>public Rect getBounds() {
    return bounds; //TODO: Return bounds by value so users can't change edit it.
}
</code></pre>

<p>Here I might as well just make bounds public. There seems to be no reason to create a function to return something if its going to pass it by reference. </p>

<p>My other option is to create several methods return the specific members of bounds 1-by-1 but I would rather not.</p>
