Packages

o

org.apache.pekko.http.javadsl.common

PartialApplication

object PartialApplication

Contains helpful methods to partially apply Functions for Java

Source
PartialApplication.scala
Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. PartialApplication
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Value Members

  1. def bindParameter[A, B, R](f: BiFunction[A, B, R], a: A): Function[B, R]

    It partially applies function A.

    It partially applies function A. In other words, it converts a 2 argument function to a 1 argument function by binding the first argument to a. Here you can see an example:

    BiFunction adder = (x, y) -> x + y;
      Function add5 = bindParameter(adder, 5);
      add5(1);
    
    

    A

    the type of the applied parameter

    B

    the type of the second parameter

    R

    the type of the return

    f

    the function to partially apply

    a

    the first parameter to partially apply

    returns

    the function partially applied

    Annotations
    @ApiMayChange()