title: Java 8 lambda expression is present
body: <p>First I need to check if data is present in list then get else set default or empty value on a Java 8 stream.</p>
  
  <p>Currently I am using below code without <code>isPresent</code> but I dont know how to use isPresent in java8.</p>
  
  <p>I am trying something below which is not perfect:</p>
  
  <pre><code>String isScheme = (this.mapProgramApproaches.stream().findFirst().isPresent())? this.mapProgramApproaches.stream().findFirst().get().getIsScheme().toString() : "0";
  </code></pre>
  
  <p>Where as <code>mapProgramApproaches</code> this is set.</p>