title: java.util.NoSuchElementException: No value present Java 8 Lambda
body: <p>I got this. But my list is not empty and they have element with code "ADPL". Why this return me NoSuchElement ? </p>
  
  <pre><code>String retour = CodeExecutionChaine.A.getCode();
      if (!lstChaines.isEmpty()) {
        retour = lstChaines.stream()
                           .filter(t -&gt; t.getNomChaine() == Chaines.ADPL.getCode())
                           .map(Chaine::getStatutChaine)
                           .findFirst()
                           .orElse(CodeExecutionChaine.A.getCode());
  </code></pre>
  
  <p>The enum Chaines</p>
  
  <pre><code>public enum Chaines {
  
    ADPL("ADPL"),
    ADIL("ADIL"),
    ADSL("ADSL");
  
    private String code = "";
  
    Chaines(String code) {
      this.code = code;
    }
  
    public String getCode() {
      return this.code;
    }
  
  }
  </code></pre>
  
  <p>This is the same for CodeExecutionChaine</p>