Esempio n. 1
0
 /**
  * Returns a single element stream if this projection has a value, otherwise an empty stream.
  *
  * @return A single element stream if this projection has a value, otherwise an empty stream.
  */
 public Stream<B> toStream() {
   return isRight() ? Stream.single(value()) : Stream.<B>nil();
 }
Esempio n. 2
0
 /**
  * Returns a single element stream if this projection has a value, otherwise an empty stream.
  *
  * @return A single element stream if this projection has a value, otherwise an empty stream.
  */
 public Stream<A> toStream() {
   return isLeft() ? Stream.single(value()) : Stream.<A>nil();
 }