aboutsummaryrefslogtreecommitdiffstats
path: root/javaparser-symbol-solver-testing/src/test/resources/Lambda.java.txt
diff options
context:
space:
mode:
Diffstat (limited to 'javaparser-symbol-solver-testing/src/test/resources/Lambda.java.txt')
-rw-r--r--javaparser-symbol-solver-testing/src/test/resources/Lambda.java.txt44
1 files changed, 44 insertions, 0 deletions
diff --git a/javaparser-symbol-solver-testing/src/test/resources/Lambda.java.txt b/javaparser-symbol-solver-testing/src/test/resources/Lambda.java.txt
new file mode 100644
index 000000000..6e0cbde00
--- /dev/null
+++ b/javaparser-symbol-solver-testing/src/test/resources/Lambda.java.txt
@@ -0,0 +1,44 @@
+import java.util.List;
+import java.util.function.BiFunction;
+
+@FunctionalInterface
+public interface Lambda {
+ String process(String value);
+}
+
+public class Agenda {
+
+ Lambda functional = p -> p.toLowerCase();
+
+ private List<String> persons;
+
+ public void lambdaMap(String personName) {
+ return persons.stream().map(p -> p.toLowerCase());
+ }
+
+ public void lambdaMap2(){
+ return persons.stream().map(p -> p.codePoints());
+ }
+
+ public void reduce(){
+ List<Integer> a;
+ return a.stream().reduce((x,y) -> x * y);
+ }
+
+ double test(BiFunction<Integer,List,String> func){
+ return 0;
+ }
+
+ public double bifunc(){
+ return test((x,y) -> String.valueOf(func(x,y)));
+ }
+
+ int func(int a, List b){
+ return 1;
+ }
+
+ public void testFunctionalVar() {
+ Lambda a = p -> p.toLowerCase();
+ }
+
+}