mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
IDEA-162051 Simplify !Stream.anyMatch(x -> !(...)) to Stream.allMatch() and so on
This commit is contained in:
+10
@@ -0,0 +1,10 @@
|
||||
// "Replace Stream.allMatch(x -> !(...)) with Stream.noneMatch(...)" "true"
|
||||
|
||||
import java.util.*;
|
||||
|
||||
class Test {
|
||||
public boolean testAnyMatch(List<List<String>> data) {
|
||||
if(data.stream().flatMap(Collection::stream).noneMatch(str -> str.isEmpty()))
|
||||
return true;
|
||||
}
|
||||
}
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
// "Replace !Stream.allMatch(x -> !(...)) with Stream.anyMatch(...)" "true"
|
||||
|
||||
import java.util.*;
|
||||
|
||||
class Test {
|
||||
public boolean testAnyMatch(List<List<String>> data) {
|
||||
if(data.stream().flatMap(Collection::stream).anyMatch(str -> str.isEmpty()))
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
// "Replace !Stream.anyMatch(...) with Stream.noneMatch(...)" "true"
|
||||
|
||||
import java.util.*;
|
||||
|
||||
class Test {
|
||||
public boolean testAnyMatch(List<List<String>> data) {
|
||||
if(data.stream().flatMap(Collection::stream).noneMatch(str -> str.isEmpty()))
|
||||
return true;
|
||||
}
|
||||
}
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
// "Replace !Stream.anyMatch(x -> !(...)) with Stream.allMatch(...)" "true"
|
||||
|
||||
import java.util.*;
|
||||
|
||||
class Test {
|
||||
public boolean testAnyMatch(List<List<String>> data) {
|
||||
if(data.stream().flatMap(Collection::stream).allMatch(str -> str.isEmpty()))
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
// "Replace !Stream.noneMatch(...) with Stream.anyMatch(...)" "true"
|
||||
|
||||
import java.util.*;
|
||||
|
||||
class Test {
|
||||
public boolean testAnyMatch(List<List<String>> data) {
|
||||
if(data.stream().flatMap(Collection::stream).anyMatch(str -> str.isEmpty()))
|
||||
return true;
|
||||
}
|
||||
}
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
// "Replace Stream.noneMatch(x -> !(...)) with Stream.allMatch(...)" "true"
|
||||
|
||||
import java.util.*;
|
||||
|
||||
class Test {
|
||||
public boolean testAnyMatch(List<List<String>> data) {
|
||||
if(data.stream().flatMap(Collection::stream).allMatch(str -> str.isEmpty()))
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
// "Replace Stream.allMatch(x -> !(...)) with Stream.noneMatch(...)" "false"
|
||||
|
||||
import java.util.*;
|
||||
|
||||
class Test {
|
||||
public boolean testAnyMatch(List<List<String>> data) {
|
||||
if(!data.stream().flatMap(Collection::stream).allM<caret>atch(str -> str.isEmpty()))
|
||||
return true;
|
||||
}
|
||||
}
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
// "Replace Stream.allMatch(x -> !(...)) with Stream.noneMatch(...)" "true"
|
||||
|
||||
import java.util.*;
|
||||
|
||||
class Test {
|
||||
public boolean testAnyMatch(List<List<String>> data) {
|
||||
if(data.stream().flatMap(Collection::stream).allM<caret>atch(str -> !str.isEmpty()))
|
||||
return true;
|
||||
}
|
||||
}
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
// "Replace !Stream.allMatch(x -> !(...)) with Stream.anyMatch(...)" "true"
|
||||
|
||||
import java.util.*;
|
||||
|
||||
class Test {
|
||||
public boolean testAnyMatch(List<List<String>> data) {
|
||||
if(!data.stream().flatMap(Collection::stream).allM<caret>atch(str -> !str.isEmpty()))
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
// "Replace !Stream.anyMatch(...) with Stream.noneMatch(...)" "true"
|
||||
|
||||
import java.util.*;
|
||||
|
||||
class Test {
|
||||
public boolean testAnyMatch(List<List<String>> data) {
|
||||
if(!data.stream().flatMap(Collection::stream).anyM<caret>atch(str -> str.isEmpty()))
|
||||
return true;
|
||||
}
|
||||
}
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
// "Replace !Stream.anyMatch(x -> !(...)) with Stream.allMatch(...)" "false"
|
||||
|
||||
import java.util.*;
|
||||
|
||||
class Test {
|
||||
public boolean testAnyMatch(List<List<String>> data) {
|
||||
if(data.stream().flatMap(Collection::stream).anyM<caret>atch(str -> !str.isEmpty()))
|
||||
return true;
|
||||
}
|
||||
}
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
// "Replace !Stream.anyMatch(x -> !(...)) with Stream.allMatch(...)" "true"
|
||||
|
||||
import java.util.*;
|
||||
|
||||
class Test {
|
||||
public boolean testAnyMatch(List<List<String>> data) {
|
||||
if(!data.stream().flatMap(Collection::stream).anyM<caret>atch(str -> !str.isEmpty()))
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
// "Replace !Stream.noneMatch(...) with Stream.anyMatch(...)" "true"
|
||||
|
||||
import java.util.*;
|
||||
|
||||
class Test {
|
||||
public boolean testAnyMatch(List<List<String>> data) {
|
||||
if(!data.stream().flatMap(Collection::stream).noneM<caret>atch(str -> str.isEmpty()))
|
||||
return true;
|
||||
}
|
||||
}
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
// "Replace Stream.noneMatch(x -> !(...)) with Stream.allMatch(...)" "true"
|
||||
|
||||
import java.util.*;
|
||||
|
||||
class Test {
|
||||
public boolean testAnyMatch(List<List<String>> data) {
|
||||
if(data.stream().flatMap(Collection::stream).noneM<caret>atch(str -> !str.isEmpty()))
|
||||
return true;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user