title: Create Stream<T> from single object
body: <p>How can you create Stream from single object? Such basic operation shown to be problematic in stream API. To illustrate, I would like to complete following method meaningfully</p>
  
  <pre><code>private Node parent;
  private List&lt;Node&gt; children;
  public Stream&lt;Node&gt; getFilteredNodes(Options o) {
      if(o.findParent()/*special case*/) return /*??? stream containing just parent*/;
      return children.stream().filter(x -&gt; x.getName().equals(o.getQuery()));
  }
  </code></pre>
  
  <p>or in other words, I would like something like LINQs <code>return Enumerable.Repeat(parent,1);</code>. Even though storing <code>parent</code> in a list with single item would work, it would also complicate other logic so I would prefer using built-in methods.</p>
  
  <hr>
  
  <p>As for what I need it for - consistency of search API, so I could search up and down hierarchy(and combine both) with same method calls, piping it to next stage.</p>