Created
March 19, 2014 08:17
-
-
Save dgageot/9637491 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public interface Function<T, R> { | |
R apply(T t); | |
static Function<?, String> toStringFunction() { | |
return value -> value.toString(); | |
} | |
static <E> Function<E, E> identity() { | |
return value -> value; | |
} | |
static <R> Function<?, R> constant(R constantValue) { | |
return value -> constantValue; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment