aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com/github/markozajc/functions/TriFunction.java
blob: 61b3002c221b254f7a60b5848d0c337b0d3ed1ea (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
package com.github.markozajc.functions;

import java.util.function.Function;

/**
 * A {@link Function} variant that takes three generic types, and returns a generic
 * type.
 *
 * @author Marko Zajc
 *
 * @param <T>
 *            the type of the first argument to the function
 * @param <U>
 *            the type of the second argument to the function
 * @param <V>
 *            the type of the third argument to the function
 * @param <R>
 *            the type of the result of the function
 */
@FunctionalInterface
public interface TriFunction<T, U, V, R> {

	/**
	 * Applies this function to the given arguments.
	 *
	 * @param t
	 *            the first function argument
	 * @param u
	 *            the second function argument
	 * @param v
	 *            the third function argument
	 *
	 * @return the function result
	 */
	R apply(T t, U u, V v);

}