Package zone.lamprey.function
Interface ToIntBiFunction<T,U>
- Type Parameters:
T- the type of the first argument to the functionU- the type of the second argument to the function
- All Superinterfaces:
BiFunction<T,U,Integer>,BiFunction<T,U,Integer>,ToIntBiFunction<T,U>
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface public interface ToIntBiFunction<T,U> extends BiFunction<T,U,Integer>, ToIntBiFunction<T,U>
Represents a function that accepts two arguments and produces an int-valued
result. This is the
int-producing primitive specialization for
BiFunction.
This is a functional interface whose
functional method is applyAsInt(Object, Object).
- Since:
- 1.8
- See Also:
BiFunction
-
Method Summary
Modifier and Type Method Description default Integerapply(T t, U u)Applies this function to the given arguments.intapplyAsInt(T t, U u)Applies this function to the given arguments.default IntSupplierapplyPartial(T t, U u)Performs a partial application, resulting in a function that calls this with its argument and the argument given here.default ToIntFunction<U>applyPartialL(T t)Performs a partial application, resulting in a function that calls this with its argument and the argument given here.default ToIntFunction<T>applyPartialR(U u)Performs a partial application, resulting in a function that calls this with its argument and the argument given here.default BiConsumer<T,U>consume(IntConsumer consumer)Consume a function.default ToIntBiFunction<T,U>map(IntUnaryOperator functor)Lift a function.default ToDoubleBiFunction<T,U>mapToDouble(IntToDoubleFunction functor)Lift a function.default ToLongBiFunction<T,U>mapToLong(IntToLongFunction functor)Lift a function.default <S> BiFunction<T,U,S>mapToObj(IntFunction<? extends S> functor)Lift a function.default BiPredicate<T,U>mapToPredicate(IntPredicate functor)Lift a function.Methods inherited from interface zone.lamprey.function.BiFunction
consume, map, mapToDouble, mapToInt, mapToLong, predicate
-
Method Details
-
applyAsInt
Applies this function to the given arguments.- Specified by:
applyAsIntin interfaceToIntBiFunction<T,U>- Parameters:
t- the first function argumentu- the second function argument- Returns:
- the function result
-
apply
Applies this function to the given arguments.- Specified by:
applyin interfaceBiFunction<T,U,Integer>- Specified by:
applyin interfaceBiFunction<T,U,Integer>- Parameters:
t- the first function argumentu- the second function argument- Returns:
- the function result
-
applyPartial
Performs a partial application, resulting in a function that calls this with its argument and the argument given here.- Specified by:
applyPartialin interfaceBiFunction<T,U,Integer>- Parameters:
t- the first function argumentu- the second function argument- Returns:
- the function result
-
applyPartialL
Performs a partial application, resulting in a function that calls this with its argument and the argument given here.- Specified by:
applyPartialLin interfaceBiFunction<T,U,Integer>- Parameters:
t- the function argument- Returns:
- the function result
-
applyPartialR
Performs a partial application, resulting in a function that calls this with its argument and the argument given here.- Specified by:
applyPartialRin interfaceBiFunction<T,U,Integer>- Parameters:
u- the function argument- Returns:
- the function result
-
consume
Consume a function.- Parameters:
consumer- The consumer to use in consuming.- Returns:
- A Consumer which passes it's argument to this function and then passes the result into the given consumer.
-
map
Lift a function.- Parameters:
functor- The function to use in lifting.- Returns:
- A function that passes the result of fn through a functor to produce a lifted function.
-
mapToObj
Lift a function.- Type Parameters:
S- The return type.- Parameters:
functor- The function to use in lifting.- Returns:
- A function that passes the result of fn through a functor to produce a lifted function.
-
mapToPredicate
Lift a function.- Parameters:
functor- The function to use in lifting.- Returns:
- A function that passes the result of fn through a functor to produce a lifted function.
-
mapToDouble
Lift a function.- Parameters:
functor- The function to use in lifting.- Returns:
- A function that passes the result of fn through a functor to produce a lifted function.
-
mapToLong
Lift a function.- Parameters:
functor- The function to use in lifting.- Returns:
- A function that passes the result of fn through a functor to produce a lifted function.
-