How to Retrieve the User Defined Objects from Collection of Collections Object
<p>In one of my requirment i have a key and each key associated with multiple document objects
            these i am storing in to HashMap with key and value pair .Key is the id and values is the List of 
            documents associated with that kEY</p>

<pre><code>        Ex : HashMap&lt;String,List&lt;Document&gt;&gt; 

        I want to put all the list documents in one collection object , ie.List&lt;Documents&gt; (all documents of all keys)
        When i am using values() method of Hashmap i am getting Collection&lt;List&lt;Document&gt;&gt;

        If i want to get all the document objects i have to get each List&lt;Document&gt; ,iterate and add it into new collection object.

        other than this Is there any best way i can get all the Documents one at a time in collection Object.
        using any apache common-collections or apache commons-collections4 api ?


        ArrayList&lt;Document&gt; al = new ArrayList&lt;Document&gt;();
        Document dto1 = new Document();
        dto1.setResearchId("1");
        dto1.setIsinCode("isinCode1");
        dto1.setEquity("equity1");

        Document dto2 = new Document();
        dto2.setResearchId("2");
        dto2.setIsinCode("isinCode2");
        dto2.setEquity("equity2");

        Document dto3 = new Document();
        dto3.setResearchId("3");
        dto3.setIsinCode("isinCode3");
        dto3.setEquity("equity3");

        Document dto4 = new Document();
        dto4.setResearchId("4");
        dto4.setIsinCode("isinCode4");
        dto4.setEquity("equity4");

        al.add(dto1);
        al.add(dto2);
        al.add(dto3);
        al.add(dto4);

        Map&lt;String ,List&lt;Document&gt;&gt; mapList = 
                 new HashMap&lt;String,List&lt;Document&gt;&gt;();
        mapList.put("1", al);
        mapList.put("2", al);
        mapList.put("3", al);


      Excepted output : Collection&lt;Document&gt;

       For sample i have added the same arraylist object in to my Map 
       but in actual i will have different arrayList objects.
</code></pre>