How to check a HashMap for unique variables?
<p>I have written code to find unique variables in a HashMap but it doesn't appear to work? I would like to be able to print the frequencies of each sausage type.</p>

<pre><code>    if(sausagesEaten.isEmpty()) { //if the HashMap is empty
        System.out.println("No sausages have been eaten");
        System.out.println("======================================================="); ; 
    }
    else{
        HashMap&lt;ArrayList, String&gt; sausagesEaten = new HashMap&lt;ArrayList, String&gt;();
        for (String key : sausagesEaten) {
              System.out.println(key + ": " + Collections.frequency(saustype, key));
        }
        System.out.println(" ");
    }
</code></pre>
