mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-10 13:17:09 +07:00
fix tests
This commit is contained in:
+1
-1
@@ -5,7 +5,7 @@ import java.util.*;
|
||||
public class Main {
|
||||
private void test() {
|
||||
List<String> other = new ArrayList<>();
|
||||
other.stream().forEach<caret>(s -> {
|
||||
other.stream().forEac<caret>h(s -> {
|
||||
if(s.length() > 2) System.out.println(s);
|
||||
});
|
||||
}
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@ import java.util.*;
|
||||
public class Main {
|
||||
private void test() {
|
||||
List<String> other = new ArrayList<>();
|
||||
other.stream().forEach<caret>(s -> { // c1
|
||||
other.stream().forEac<caret>h(s -> { // c1
|
||||
if(s.length() > 2) System.out.println(s); //c2
|
||||
});
|
||||
}
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@ import java.util.*;
|
||||
public class Main {
|
||||
private void test(List<String> strs) {
|
||||
List<String> other = new ArrayList<>();
|
||||
strs.stream().forEach<caret>(s -> {
|
||||
strs.stream().forEac<caret>h(s -> {
|
||||
if(s.length() > 2) {
|
||||
other.add(s);
|
||||
}
|
||||
|
||||
+1
-1
@@ -6,6 +6,6 @@ public class Main {
|
||||
private void test() {
|
||||
List<String> strs = new ArrayList<>();
|
||||
List<String> other = new ArrayList<>();
|
||||
other.stream().forEach<caret>(s -> {strs.add(s)});
|
||||
other.stream().forEac<caret>h(s -> {strs.add(s)});
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@ public class Main {
|
||||
private void test() {
|
||||
List<String> strs = new ArrayList<>();
|
||||
List<String> other = new ArrayList<>();
|
||||
other.stream().forEach<caret>(s -> {
|
||||
other.stream().forEac<caret>h(s -> {
|
||||
if(s.length() > 2) strs.add(s);
|
||||
});
|
||||
}
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@ public class Main {
|
||||
private void test() {
|
||||
List<String> strs = new ArrayList<>();
|
||||
List<String> other = new ArrayList<>();
|
||||
other.stream().forEach<caret>(s -> {
|
||||
other.stream().forEac<caret>h(s -> {
|
||||
if(s.length() > 2) {
|
||||
strs.add(s);
|
||||
}
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@ public class Main {
|
||||
private void test() {
|
||||
List<String> strs = new ArrayList<>();
|
||||
List<String> other = new ArrayList<>();
|
||||
other.stream().forEach<caret>(s -> {
|
||||
other.stream().forEac<caret>h(s -> {
|
||||
if(s.length() > 2) {
|
||||
strs.add(s);
|
||||
}
|
||||
|
||||
+1
-1
@@ -5,6 +5,6 @@ import java.util.*;
|
||||
public class Main {
|
||||
private void test() {
|
||||
List<String> other = new ArrayList<>();
|
||||
other.stream().forEachOrdered<caret>(s -> {if(s.length() > 2) System.out.println(s);});
|
||||
other.stream().forEachOrdere<caret>d(s -> {if(s.length() > 2) System.out.println(s);});
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -5,6 +5,6 @@ import java.util.*;
|
||||
public class Main {
|
||||
private void test(List<String> other) {
|
||||
List<String> strs = new ArrayList<>();
|
||||
other.stream().forEach<caret>(s -> {strs.add(s)});
|
||||
other.stream().forEac<caret>h(s -> {strs.add(s)});
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -6,6 +6,6 @@ public class Main {
|
||||
private void test() {
|
||||
List<String> strs = new ArrayList<>();
|
||||
List<String> other = new ArrayList<>();
|
||||
other.stream().forEach<caret>(s -> strs.add(s));
|
||||
other.stream().forEac<caret>h(s -> strs.add(s));
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -6,6 +6,6 @@ public class Main {
|
||||
private void test() {
|
||||
List<String> strs = new ArrayList<>();
|
||||
int count = 0;
|
||||
strs.stream().forEach<caret>(x -> count++)
|
||||
strs.stream().forEac<caret>h(x -> count++)
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -6,6 +6,6 @@ public class Main {
|
||||
private void test() {
|
||||
List<String> strs = new ArrayList<>();
|
||||
StringBuilder sb = new StringBuilder();
|
||||
strs.stream().forEach<caret>(x -> sb.append(x));
|
||||
strs.stream().forEac<caret>h(x -> sb.append(x));
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@ import java.util.*;
|
||||
public class Main {
|
||||
private void test(List<String> strs) {
|
||||
List<String> tmp = new ArrayList<>();
|
||||
strs.stream().forEach<caret>(x -> tmp.add(x));
|
||||
strs.stream().forEac<caret>h(x -> tmp.add(x));
|
||||
String[] arr = tmp.toArray();
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -6,6 +6,6 @@ public class Main {
|
||||
private void test() {
|
||||
List<String> other = new ArrayList<>();
|
||||
HashMap<Integer, String> map = new HashMap<Integer, String>();
|
||||
other.stream().forEach<caret>(s -> map.putIfAbsent(s.length(), s));
|
||||
other.stream().forEac<caret>h(s -> map.putIfAbsent(s.length(), s));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user