Skip to content
This repository has been archived by the owner on Nov 23, 2023. It is now read-only.

Create PredicateX#safe #110

Open
6 tasks
alexengrig opened this issue May 7, 2020 · 0 comments
Open
6 tasks

Create PredicateX#safe #110

alexengrig opened this issue May 7, 2020 · 0 comments
Labels
enhancement New feature or request

Comments

@alexengrig
Copy link
Owner

Call predicate without NPE.

assert PredicateX.safe(b -> true).test(null) == false;

assert PredicateX.safe(b -> false, true).test(null) == true;

assert PredicateX.safe(b -> false, () -> true).test(null) == true;

assert PredicateX.safeLie(b -> true).test(null) == false;

assert PredicateX.safeTruth(b -> false).test(null) == true;
  • Implemention
  • Test
  • Documentation
  • CHANGES
  • README
  • MIGRATION
@alexengrig alexengrig added the enhancement New feature or request label May 7, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant