Redefine a method
<p>I have a class A which holds a collection of objects. Every instance of the class fills the collection according a different logic. From time to time I need to update all the collections. 
I was thinking this could be done maybe if the class has a method that holds the logic for filling the collection and I can set this logic at the time of the creation of the object. 
Like this:</p>

<pre><code>MyClass instance = new MyClass();

instance.updateCollection = { logic for filling the collection } //
</code></pre>

<p>The logic will be different for each object.</p>

<p>Thanks</p>
