mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-10 13:17:09 +07:00
MigrateToStreamFix: explicit formatting removed (as formatted anyways automatically)
This commit is contained in:
+1
-1
@@ -5,6 +5,6 @@ import java.util.stream.Collectors;
|
||||
|
||||
public class Main {
|
||||
private void test(List<String> strs) {
|
||||
List<String> other = strs.stream().filter(s -> s.length() > 2).collect(Collectors.toList());
|
||||
List<String> other = strs.stream().filter(s -> s.length() > 2).collect(Collectors.toList());
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@ import java.util.*;
|
||||
|
||||
public class Main {
|
||||
void test(List<String> list) {
|
||||
int count = (int) list.stream().filter(s -> !s.isEmpty()).count();
|
||||
int count = (int) list.stream().filter(s -> !s.isEmpty()).count();
|
||||
System.out.println(count);
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@ import java.util.*;
|
||||
|
||||
public class Main {
|
||||
void test(List<String> list) {
|
||||
String longest = list.stream().max(Comparator.comparingInt(String::length)).orElse(null);
|
||||
String longest = list.stream().max(Comparator.comparingInt(String::length)).orElse(null);
|
||||
System.out.println(longest);
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -5,6 +5,6 @@ import java.util.stream.Collectors;
|
||||
|
||||
public class Main {
|
||||
private void test(List<String> other) {
|
||||
List<String> strs = other.stream().collect(Collectors.toList());
|
||||
List<String> strs = other.stream().collect(Collectors.toList());
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -5,6 +5,6 @@ import java.util.*;
|
||||
public class Main {
|
||||
private void test() {
|
||||
List<String> strs = new ArrayList<>();
|
||||
int count = (int) strs.stream().count();
|
||||
int count = (int) strs.stream().count();
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -6,6 +6,6 @@ import java.util.stream.Collectors;
|
||||
public class Main {
|
||||
private void test() {
|
||||
List<String> strs = new ArrayList<>();
|
||||
String sb = strs.stream().collect(Collectors.joining());
|
||||
String sb = strs.stream().collect(Collectors.joining());
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -6,6 +6,6 @@ import java.util.stream.Collectors;
|
||||
public class Main {
|
||||
private void test() {
|
||||
List<String> other = new ArrayList<>();
|
||||
HashMap<Integer, String> map = other.stream().collect(Collectors.toMap(String::length, s -> s, (a, b) -> a, HashMap::new));
|
||||
HashMap<Integer, String> map = other.stream().collect(Collectors.toMap(String::length, s -> s, (a, b) -> a, HashMap::new));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user