Class BinaryCompositeBinaryFunction.Helper<G,​H,​L,​R,​T>

  • Type Parameters:
    G - the function left argument type.
    H - the function right argument type.
    All Implemented Interfaces:
    java.io.Serializable, BinaryFunction<L,​R,​T>, BinaryFunctor<L,​R>, Functor
    Enclosing class:
    BinaryCompositeBinaryFunction<L,​R,​T>

    private static class BinaryCompositeBinaryFunction.Helper<G,​H,​L,​R,​T>
    extends java.lang.Object
    implements BinaryFunction<L,​R,​T>, java.io.Serializable
    Type-remembering Helper.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private BinaryFunction<? super G,​? super H,​? extends T> f
      Global evaluator.
      private BinaryFunction<? super L,​? super R,​? extends G> g
      This function evaluation will be the left argument of main evaluator.
      private BinaryFunction<? super L,​? super R,​? extends H> h
      This function evaluation will be the right argument of main evaluator.
      private static long serialVersionUID
      serialVersionUID declaration.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      T evaluate​(L left, R right)
      Evaluate this function.
      • Methods inherited from class java.lang.Object

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

      • serialVersionUID

        private static final long serialVersionUID
        serialVersionUID declaration.
        See Also:
        Constant Field Values
      • f

        private BinaryFunction<? super G,​? super H,​? extends T> f
        Global evaluator.
      • g

        private BinaryFunction<? super L,​? super R,​? extends G> g
        This function evaluation will be the left argument of main evaluator.
      • h

        private BinaryFunction<? super L,​? super R,​? extends H> h
        This function evaluation will be the right argument of main evaluator.
    • Constructor Detail

      • Helper

        public Helper​(BinaryFunction<? super G,​? super H,​? extends T> f,
                      BinaryFunction<? super L,​? super R,​? extends G> g,
                      BinaryFunction<? super L,​? super R,​? extends H> h)
        Create a new Helper.
        Parameters:
        f - final BinaryFunction to evaluate
        g - left preceding BinaryFunction
        h - right preceding BinaryFunction
    • Method Detail

      • evaluate

        public T evaluate​(L left,
                          R right)
        Evaluate this function.
        Specified by:
        evaluate in interface BinaryFunction<G,​H,​L>
        Parameters:
        left - the L element of the ordered pair of arguments
        right - the R element of the ordered pair of arguments
        Returns:
        the T result of this function for the given arguments