title: Creating List<Set> from a List<Object> with similar property
body: <pre><code>class A {
    private String x;
    private String y;
    //getters and setters
  }
  </code></pre>
  
  <p>Suppose I have a list of Objects of type A. Now consider.</p>
  
  <pre><code>A a = new A("x","something1");
  A b = new A("x","something2");
  A c = new A("y","something3");
  A d = new A("y","something4");
  
  List&lt;A&gt; aList = new ArrayList&lt;&gt;();
  
  `alist` contains a, b,c ,d
  </code></pre>
  
  <p>Can I filter the list and create a list of sublist according to the following criteria: if the value of the property x is equal group them to a sublist?</p>
  
  <p>So Output should be something like.</p>
  
  <pre><code>List&lt;A&gt; someList = new ArrayList&lt;&gt;(); //someList contains a,b
  
  List&lt;A&gt; someOtherList = new ArrayList&lt;&gt;(); //someOtherList contains c,d.
  </code></pre>
  
  <p>Final Output list contains someList and someOtherList.</p>