MigrateToStreamFix: explicit formatting removed (as formatted anyways automatically)

This commit is contained in:
Tagir Valeev
2018-05-30 18:23:38 +07:00
parent fa47bcb437
commit 3c2cd21d35
151 changed files with 175 additions and 176 deletions
@@ -9,7 +9,7 @@ public class Main {
}
public long test(List<Person> collection) {
long i = collection.stream().filter(Objects::nonNull).mapToLong(Person::getAge).sum();
long i = collection.stream().filter(Objects::nonNull).mapToLong(Person::getAge).sum();
return i;
}
}
@@ -8,7 +8,7 @@ public class Main {
}
public long test(List<Person> collection, Person include) {
long i = collection.stream().filter(include::equals).mapToLong(Person::getAge).sum();
long i = collection.stream().filter(include::equals).mapToLong(Person::getAge).sum();
return i;
}
}
@@ -8,7 +8,7 @@ public class Main {
}
public double test(List<Person> collection) {
double d = collection.stream().filter(person -> !(person.getAge() == 10)).mapToDouble(Person::getAge).sum();
double d = collection.stream().filter(person -> !(person.getAge() == 10)).mapToDouble(Person::getAge).sum();
return d;
}
}
@@ -6,7 +6,7 @@ import java.util.stream.Collectors;
public class Main {
public List<String> test(Map<String, List<String>> map) {
List<String> result = map.entrySet().stream().filter(entry -> !entry.getKey().isEmpty()).map(Map.Entry::getValue).filter(Objects::nonNull).flatMap(Collection::stream).map(String::trim).filter(trimmed -> !trimmed.isEmpty()).collect(Collectors.toList());
List<String> result = map.entrySet().stream().filter(entry -> !entry.getKey().isEmpty()).map(Map.Entry::getValue).filter(Objects::nonNull).flatMap(Collection::stream).map(String::trim).filter(trimmed -> !trimmed.isEmpty()).collect(Collectors.toList());
return result;
}
}
@@ -6,7 +6,7 @@ import java.util.stream.Collectors;
public class Main {
public List<String> test(Map<String, List<String>> map) {
List<String> result = map.entrySet().stream().filter(entry -> !entry.getKey().isEmpty()).map(Map.Entry::getValue).filter(Objects::nonNull).flatMap(Collection::stream).map(String::trim).filter(trimmed -> !trimmed.isEmpty()).collect(Collectors.toList());
List<String> result = map.entrySet().stream().filter(entry -> !entry.getKey().isEmpty()).map(Map.Entry::getValue).filter(Objects::nonNull).flatMap(Collection::stream).map(String::trim).filter(trimmed -> !trimmed.isEmpty()).collect(Collectors.toList());
return result;
}
}
@@ -8,7 +8,7 @@ public class Main {
}
public long test(List<Person> collection) {
long i = collection.stream().filter(person -> person != null && person.getAge() >= 10).mapToLong(Person::getAge).sum();
long i = collection.stream().filter(person -> person != null && person.getAge() >= 10).mapToLong(Person::getAge).sum();
return i;
}
}