title: Java ObservableList filtering with predicate with Strings
body: <p>I have an observable list, I tried to filter it by different predicates.</p>
  
  <p>I have nested objects on which I do filtering.</p>
  
  <p>Here is the first pojo</p>
  
  <pre><code>public Class Transaction  {
      private String name; 
      private Account account ; 
      private BigDecimal ammout ; 
  }
  
  
  public class Account{
      private String nameBank;
      private String number;
      private BigDecimal balance;
  }
  </code></pre>
  
  <p>I have used Java 8 stream API to do filtering, it doesn't work for String, but it works perfectly for balance and other types.</p>
  
  <p>Here is how i do filter my list:</p>
  
  <pre><code>public void findByBankName(String bankName) {
  ObservableList&lt;Transaction&gt; transactionList = FXCollections
              .observableArrayList();
   return transactionList.stream()
                  .filter(t -&gt;
                          t.getAccount().getnameBank().Contains(bankName) )
                  .collect(Collectors.toList());
  
  // Instead it work when i do 
  // .filter(t -&gt;  t.getAccount().getBalance().doubleValue() &gt; 0 )
  }
  </code></pre>
  
  <p>So, what's the issue with my code ?</p>