Accessor methods for Collections in Java
<p>Given a generic class:</p>

<pre><code>class MyClass (
       private List l = new LinkedList &lt;String&gt;();

       public void addElement (String s) (l.add (s);)
       .............
)
</code></pre>

<p>an accessor method that allows me to iterate on the list  as it should be?</p>

<p>I had decided to implement a method that returns an iterator directly, but does not seem correct because it could change the list from the outside with remove ().</p>

<p>What do you think?</p>
