title: Returning a private collection using a getter method in Java
body: <p>I have a number of Java classes that use private sets or lists internally. I want to be able to return these sets/lists using a get...List() method.</p>
  
  <p>The alternatives I am considering:</p>
  
  <ol>
  <li>return a reference to the internal object</li>
  <li>construct a new set/list and fill it up (this seems bad practice?)</li>
  <li>use <code>Collections.unmodifiableList(partitions);</code></li>
  </ol>
  
  <p>Which of these is the most common / best way to solve this issue?</p>