fix tests

This commit is contained in:
Roman Ivanov
2017-09-01 17:26:19 +07:00
parent 3fa1f3020a
commit 9938f0d0e7
14 changed files with 14 additions and 14 deletions
@@ -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);
});
}
@@ -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
});
}
@@ -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);
}
@@ -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)});
}
}
@@ -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);
});
}
@@ -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);
}
@@ -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);
}
@@ -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);});
}
}
@@ -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)});
}
}
@@ -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));
}
}
@@ -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++)
}
}
@@ -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));
}
}
@@ -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();
}
}
@@ -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));
}
}