Class Result.BiCombiner<U>

  • Enclosing class:
    Result<T,​I>

    public final class Result.BiCombiner<U>
    extends java.lang.Object
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      <V> Result<V,​I> mergeFlatMap​(java.util.function.BiFunction<T,​U,​Result<V,​I>> combiner)  
      <V> Result<V,​I> mergeMap​(java.util.function.BiFunction<T,​U,​V> combiner)
      Merges the contents of the two results.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • mergeMap

        public <V> Result<V,​I> mergeMap​(java.util.function.BiFunction<T,​U,​V> combiner)
        Merges the contents of the two results.
        Type Parameters:
        V -
        Parameters:
        combiner - BiFunction to combine the contents if both exist.
        Returns:
        a new Result<V, I> containing the merged content.
      • mergeFlatMap

        public <V> Result<V,​I> mergeFlatMap​(java.util.function.BiFunction<T,​U,​Result<V,​I>> combiner)