title: Java 8 Optional asSet()
body: <p>So I have been using Guava's <code>Optional</code> for a while now, and I'm moving to Java 8 so I wanted to use its <code>Optional</code> class, but it doesn't have my favorite method from Guava: <code>asSet()</code>. Is there a way to do this with the Java 8 <code>Optional</code> that I am not seeing. I love being able to treat <code>Optional</code> as a collection so I can do this:</p>
  <pre><code>for (final User u : getUserOptional().asSet()) {
     return u.isPermitted(getPermissionRequired());
  }
  </code></pre>
  <p>In some cases avoids the need for an additional variable.</p>
  <p>For example:</p>
  <pre><code> Optional&lt;User&gt; optUser = getUserOptional();
   if (optUser.isPresent()) {
       return optUser.get().isPermitted(getPermissionRequired());
   }
  </code></pre>
  <p>Is there an easy way to replicate the Guava style in Java 8's <code>Optional</code>?</p>
  <p>Thanks</p>