mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 06:05:01 +07:00
guava type migration: support of Predicates.alwaysTrue/alwaysFalse/notNull/isNull/equalTo IDEA-148823
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
import com.google.common.base.Predicate;
|
||||
import com.google.common.base.Predicates;
|
||||
import com.google.common.collect.FluentIterable;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
class Main {
|
||||
Predicate<String> m() {
|
||||
Predicate<Object> qwe = Predicates.alwaysTrue();
|
||||
|
||||
Predicate<String> p1 = Predicates.or(Predicates.alwaysFalse(), Predicates.equalTo("asd"));
|
||||
|
||||
Predicate<String> not = Predicates.not(Predicates.notNull());
|
||||
return not;
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
import java.util.Objects;
|
||||
import java.util.function.Predicate;
|
||||
|
||||
class Main {
|
||||
Predicate<String> m() {
|
||||
Predicate<Object> qwe = o -> true;
|
||||
|
||||
Predicate<String> p1 = ((Predicate<String>) s -> false).or(s -> Objects.equals(s, "asd"));
|
||||
|
||||
Predicate<String> not = ((Predicate<String>) s -> s != null).negate();
|
||||
return not;
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user