Get ArrayList element by custom text indexing
<p>What I'm doing is storing classes into an ArrayList and retrieve them by its index number.  But are there any list classes in Java where I can retrieve a list element by, lets say, its name?  Like this:</p>

<pre><code>ArrayList&lt;string&gt; myArr = new ArrayList&lt;string&gt;();
myArr.add( "ID_name", "String to store" );
</code></pre>

<p>ands then retrieve it by:</p>

<pre><code>myArr.get( "ID_name" );
</code></pre>

<p>Also, are there any other alternatives to ArrayList?  I need a list class to be optimized for:</p>

<ul>
<li>Random access</li>
<li>Only need to push items into the list</li>
<li>Never need to delete anything from the list</li>
</ul>
