introduce functional variable: encode this (IDEA-174203)

This commit is contained in:
Anna Kozlova
2017-06-09 16:51:20 +03:00
parent 404fe68c03
commit d0fab7fd0b
4 changed files with 31 additions and 3 deletions
@@ -0,0 +1,9 @@
import java.util.function.Function;
class Test {
String string;
void useThis() {
Function<String, String> stringStringFunction = string -> string;
System.out.println(stringStringFunction.apply(string));
}
}
@@ -0,0 +1,6 @@
class Test {
String string;
void useThis() {
System.out.println(<selection>this.string</selection>);
}
}