aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/eu/zajc/ef/function/BooleanFunction.java
blob: 6b42f4277bf07173dd486424713a0c324708e6a6 (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
package org.eu.zajc.ef.function;

import java.util.function.Function;

/**
 * A {@link Function} variant that takes a primitive boolean, and returns a generic
 * type.
 *
 * @author Marko Zajc
 *
 * @param <R>
 *            the type of the result of the function
 */
@FunctionalInterface
public interface BooleanFunction<R> {

	/**
	 * Applies this function to the given arguments.
	 *
	 * @param p
	 *            value the function argument
	 *
	 * @return the function result
	 */
	R apply(boolean p);

}