blob: 53258b3e7aeb98efcfdcbf27af5a2c3eb71053c0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
class ValLambda {
ValLambda() {
super();
}
public void easyLambda() {
final @lombok.val java.lang.Runnable foo = (Runnable) () -> {
};
}
public void easyIntersectionLambda() {
final @lombok.val java.lang.Runnable foo = (Runnable & java.io.Serializable) () -> {
};
final @lombok.val java.io.Serializable bar = (java.io.Serializable & Runnable) () -> {
};
}
public void easyLubLambda() {
final @lombok.val java.lang.Runnable foo = ((System.currentTimeMillis() > 0) ? (Runnable) () -> {
} : System.out::println);
}
}
|