testdata for IDEA-175280

This commit is contained in:
Anna.Kozlova
2017-07-03 11:10:54 +02:00
parent 49b4dec281
commit 1699697000
2 changed files with 22 additions and 0 deletions

View File

@@ -0,0 +1,21 @@
import java.util.*;
import java.util.function.*;
class MethodReferenceWithArguments {
static <T, U> T createWith(Function<? super U, ? extends T> methodRef, U arg) {
return methodRef.apply(arg);
}
public static void main(String[] args) {
Map<String, String> map = createWith(
TreeMap::new,
Comparator.<String>reverseOrder());
map.put("aaa", "ONE");
map.put("zzz", "TWO");
System.out.println(map);
}
}