Searching a List
<p>Lets say I have a list and I am trying to look up a Class element in it, from which I only know one (unique) attribute.</p>

<pre><code>public static List&lt;Achievement&gt; listAchievements;
String idAchievement = "5764e35";
</code></pre>

<p>This is obviously not working</p>

<pre><code>listAchievements.indexOf(idAchievement );
</code></pre>

<p>Neither is this</p>

<pre><code>Achievement ach(idAchievement);
listAchievements.getIndexOf(ach);
</code></pre>

<p>and the workaround is not pretty</p>

<pre><code> for (Achievement achievement : listAchievements) {
        if (achievement.resourceID().equalsIgnoreCase(idAchievement)) {
            // STUFF
            break;
        }
    }
</code></pre>
