Defining a type for a Java Collection
<p>Is there a way to define a type for a Collection?</p>

<p>If I have the following:</p>

<pre><code>private Map&lt;String, A&gt; myMap;
</code></pre>

<p>then is there a way to define <code>Map&lt;String, A&gt;</code> as a new type MapOfTypeA, for example, so that I can define myMap as </p>

<pre><code>private MapOfTypeA myMap;
</code></pre>

<p>as an extension of this, is there a way to have the following:</p>

<pre><code>myMap = new MapOfTypeA();
</code></pre>

<p>actually be </p>

<pre><code>myMap = new HashMap&lt;String, A&gt;();
</code></pre>

<p>I'm not sure of what to call what I am asking, but I think I have explained it.  In C or C++ it would be a typedef, I think.</p>
