title: Java List filter by date
body: <p>I try use my first filter in <a href="https://docs.oracle.com/javase/10/docs/api/javafx/collections/transformation/FilteredList.html" rel="nofollow noreferrer"><code>FilteredList</code></a> but of course it doesn't work. </p>
  
  <pre><code>public class ListRemove {
  
      public static void main(String[] args) {
  
          ObservableList&lt;CashBalance&gt; cashBalanceList = FXCollections.observableArrayList();
  
          LocalDate f1 = LocalDate.of(2011, Month.JANUARY, 1);
          LocalDate f2 = LocalDate.of(2015, Month.AUGUST, 2);
  
          CashBalance c1 = new CashBalance();
          CashBalance c2 = new CashBalance();
          c1.setData(f1);
          c2.setData(f2);
  
          cashBalanceList.setAll(c1, c2);
  
          FilteredList&lt;CashBalance&gt; filteredList = new FilteredList&lt;CashBalance&gt;(cashBalanceList);
  
          filteredList.stream().filter(p -&gt; p.getData().isAfter(LocalDate.of(2012, Month.JUNE, 2)))
                  .collect(Collectors.toList());
  
          for (CashBalance l : filteredList) {
  
              System.out.println(l.getData());
  
          }
      }
  }
  </code></pre>
  
  <p>Should show one date but two are displayed. What am I doing wrong ?</p>