Java test specific property of an object using Collection.contains()
<p>In Java how to test if a Collection of objects contains an object depending on one of its properties.</p>

<p>For example I would like to test if <code>Collection&lt;myObjects&gt;</code> contains an instance of myObjects which has myObjects.name = "myName".</p>
