title: Issue with Refactoring the existing code using Streams (Java8)
body: <p>I'm new to Streams and using Java 8 version. I'm trying to refactor my existing code by using Streams.
  Here is the code snippet:</p>
  
  <pre><code>       List&lt;AddressAccessibility&gt; addressAccessibility = entity.getAccessibility();
         List&lt;String&gt; entries = new ArrayList&lt;String&gt;();
         for (AddressAccessibility element : addressAccessibility) {
  
             String verificationHash;
             if (element.getVerification() != null) {
                 verificationHash = verificationHashCodeGenerator(element.getVerification());
             } else {
                 verificationHash = "No Verification";
             }
             String id = getFirstIdAndCache(element.getId(), IdReferenceTypes.ADDRESSACCESSIBILITY.getValue(),
                     IdReferenceTypes.ID.getValue());
             StringBuilder entryBuilder = new StringBuilder().append(id).append(DELIM)
                     .append(getPrimaryId(healthCareProvider.getId())).append(DELIM)
                     .append(getPrimaryId(element.getSuppliedId())).append(DELIM);
             if (element.getLocationAccessibilityCategory() != null) {
                 entryBuilder.append(element.getLocationAccessibilityCategory().getCode()).append(DELIM)
                         .append(element.getLocationAccessibilityCategory().getShortName()).append(DELIM)
                         .append(element.getLocationAccessibilityCategory().getLongName()).append(DELIM);
             } else {
                 entryBuilder.append(DELIM).append(DELIM).append(DELIM);
             }
             entryBuilder.append(element.getLocationAccessibilityText()).append(DELIM).append(verificationHash);
  
             String entry = replaceNullMethod(entryBuilder.toString());
             entries.add(entry);
         }
  </code></pre>
  
  <p>To refactor above code using streams, I tried like this :</p>
  
  <pre><code>Function&lt;AddressAccessibility,String&gt; address = (AddressAccessibility element) -&gt; {
  
              String verificationHash;
              if (element.getVerification() != null) {
                  verificationHash = verificationHashCodeGenerator(element.getVerification());
              } else {
                  verificationHash = "No Verification";
              }
              String id = getFirstIdAndCache(element.getId(), IdReferenceTypes.ADDRESSACCESSIBILITY.getValue(),
                      IdReferenceTypes.ID.getValue());
              StringBuilder entryBuilder = new StringBuilder().append(id).append(DELIM)
                      .append(getPrimaryId(healthCareProvider.getId())).append(DELIM)
                      .append(getPrimaryId(element.getSuppliedId())).append(DELIM);
              if (element.getLocationAccessibilityCategory() != null) {
                  entryBuilder.append(element.getLocationAccessibilityCategory().getCode()).append(DELIM)
                          .append(element.getLocationAccessibilityCategory().getShortName()).append(DELIM)
                          .append(element.getLocationAccessibilityCategory().getLongName()).append(DELIM);
              } else {
                  entryBuilder.append(DELIM).append(DELIM).append(DELIM);
              }
              entryBuilder.append(element.getLocationAccessibilityText()).append(DELIM).append(verificationHash);
  
              String entry = replaceNullMethod(entryBuilder.toString());
              entries.add(entry);
          } 
  }
  
   entity.getAccessibility().stream().map(address).collect(toList());
  
  </code></pre>
  
  <p>Is this the right approach to refactor the above code?. Please suggest the best way to refactor the above code.</p>