title: Sort/Filter ObservableList which holds duplicate entries and display as TreeTableView
body: <p>i have an ObservableList which holds objects of type Auftrag.
  The object Auftrag has a property NR which could occur multiple times(duplicates) in the ObservableList but the other property content differs.</p>
  
  <p>I try to use this to show all entries with the same NR under a root TreeItem.</p>
  
  <p>Now i try to display the data in a TreeTableView where the first NR item string of a bunch of Auftrag objects should be the root TreeItem and the following items with the same NR should be the child TreeItems.</p>
  
  <p>Here is the problem. Only the first item is displayed and in it all the others.
  Here´s some example code first create the TreeTableView</p>
  
  <pre><code>@FXML
  private TreeTableView&lt;Auftrag&gt; abTreeTable;
  </code></pre>
  
  <p>now create a column and set root and add column</p>
  
  <pre><code>TreeTableColumn&lt;Auftrag,String&gt; nrTreeCol = new TreeTableColumn&lt;&gt;("NR");
  nrTreeCol.setMinWidth(80);
  nrTreeCol.setCellValueFactory(
  (TreeTableColumn.CellDataFeatures&lt;Auftrag,String&gt; param) -&gt;new ReadOnlyObjectWrapper&lt;String&gt;(param.getValue().getValue().getNR()));
  abTreeTable.setRoot(createTreeStructure(u));
  abTreeTable.getColumns().add(nrTreeCol);
  </code></pre>
  
  <p>and here i create the structure</p>
  
  <pre><code>private TreeItem createTreeStructure(ObservableList&lt;Auftrag&gt; items){
      int itemcount = items.size();
      TreeItem&lt;Auftrag&gt; main = new TreeItem&lt;Auftrag&gt;(items.get(0));
      for (int i =1; i &lt; itemcount; i++) {
          String ab = items.get(i).getNR();
          ObservableList&lt;Auftrag&gt; same = getSameAuftrag(items,ab);
          TreeItem&lt;Auftrag&gt; root = new TreeItem&lt;Auftrag&gt;(items.get(i));
          same.forEach(item-&gt;{
              TreeItem&lt;Auftrag&gt; child = new TreeItem&lt;Auftrag&gt;(item);
              root.getChildren().add(child);
          });
          main.getChildren().add(root);
      }
  
      return main;
  </code></pre>
  
  <p>here the look up for same NRs is done but does´t seem to work right</p>
  
  <pre><code>private ObservableList&lt;Auftrag&gt; getSameAuftrag(ObservableList&lt;Auftrag&gt; items, String ab){
          ObservableList&lt;Auftrag&gt; same = FXCollections.observableArrayList();
          for (int i = 0; i &lt; items.size(); i++) {
              if (items.get(i).getNR() == ab){
                  same.add(items.get(i));
              }
          }
  
          return same;
      }
  </code></pre>
  
  <p>and it looks like this</p>
  
  <p><img src="https://i.stack.imgur.com/OYSit.png" alt="root TreeItem and all other items are child"></p>
  
  <p>Here you see that the getSameAuftrag function seems to not work correctly because there are five NRs with the same string those should be in a root node...</p>
  
  <p><img src="https://i.stack.imgur.com/pErbJ.png" alt="three times same NR"></p>
  
  <p>What i expect is a root row(TreeItem) with the NR as title and if i expand it should show all child TreeItems with the same NR...</p>
  
  <p>Hope someone could help</p>