group objects of list with the same reference in one object
<p>I need to group objects of a list with the same reference in one object that has the same reference and whose <code>stud_locatio</code> field contains the concatenation of all the fields of the previous items.</p>

<pre><code>public class Grouping {

/**
 * @param args the command line arguments
 */
public static void main(String[] args) {

    List&lt;Entreprise&gt; entlist = new ArrayList&lt;Entreprise&gt;();
    entlist.add(new Entreprise("11111", "logi", "New York"));
    entlist.add(new Entreprise("11111", "logi", "California"));
    entlist.add(new Entreprise("22222", "rafa", "Los Angeles"));
    entlist.add(new Entreprise("22222", "rafa", "New York"));
    entlist.add(new Entreprise("33333", "GR SARL", "LONDON"));
    entlist.add(new Entreprise("33333", "GR SARL", "LONDON"));
    entlist.add(new Entreprise("33333", "GR SARL", "italie"));
    entlist.add(new Entreprise("33333", "GR SARL", "Paris"));

    /*  Output should be Like below
        1111  :  logi : logi - New York
        22222 :  rafa : Los Angeles - California
        33333 :  GR SARL :   LONDON -  italie - paris */
}

class Entreprise {

    String reference;
    String stud_name;
    String stud_location;

    ENTREPRISE(String sid, String sname, String slocation) {
        this.ref = sid;
        this.stud_name = sname;
        this.stud_location = slocation;
    }
}
</code></pre>