In addition to the Predicates added in #144, it would be nice to have a Predicate that can perform like Collection#contains(Object o). Right now in my project (@paulodamaso, you know because you wrote it), we have a bit of code being introduced that looks like this:
new And(
user -> {
user.deactivate();
user.delete();
},
new Filtered<>(
user ->
new Or(
new Filtered<Role>(
role -> role.getType().equals("SUPER_ADMIN"),
user.listRoles()
)
).value(),
this.cli.listUsers()
)
);
It would be nice if it could look like this:
new And(
user -> {
user.deactivate();
user.delete();
},
new Filtered<>(
user ->
new Contains<>(
role -> role.getType().equals("SUPER_ADMIN"),
user.listRoles()
).value(),
this.cli.listUsers()
)
);
@stuporhero/z this project will fix the problem faster if you donate a few dollars to it; just click here and pay via Stripe, it's very fast, convenient and appreciated; thanks a lot!
In addition to the Predicates added in #144, it would be nice to have a Predicate that can perform like
Collection#contains(Object o)
. Right now in my project (@paulodamaso, you know because you wrote it), we have a bit of code being introduced that looks like this:It would be nice if it could look like this: