Libraryless. Click here for Pure Java version (5051L/28K).
static <A> IPred<A> setToPredicate(Set<A> set) { ret set == null ? a -> false : a -> contains(set, a); }
download show line numbers debug dex old transpilations
Travelled to 3 computer(s): bhatertpkbcr, mowyntqkapby, mqqgnosmbjvj
No comments. add comment
Snippet ID: | #1034874 |
Snippet name: | setToPredicate - .contains() as a predicate. null set will return always-false predicate |
Eternal ID of this version: | #1034874/2 |
Text MD5: | 283c6bbb155a4ad88ae1b210645053ee |
Transpilation MD5: | 6df8ecbc14cbbd34d2986815cc6f3271 |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2022-03-12 22:39:41 |
Source code size: | 108 bytes / 3 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 137 / 212 |
Version history: | 1 change(s) |
Referenced in: | #1006654 - Standard functions list 2 (LIVE, continuation of #761) #1034875 - containsKeyPredicate - .containsKey() as a predicate. null map will return always-false predicate |