Libraryless. Click here for Pure Java version (7904L/44K).
1 | static <A, B extends A> Set<B> antiFilterToSet(Iterable<B> c, IPred<A> pred) {
|
2 | Set<B> x = similarEmptySet(c); |
3 | if (c != null) for (B o : c) |
4 | if (!pred.get(o)) |
5 | x.add(o); |
6 | ret x; |
7 | } |
8 | |
9 | static <A, B extends A> Set<B> antiFilterToSet(IPred<A> pred, Iterable<B> c) {
|
10 | ret antiFilterToSet(c, pred); |
11 | } |
Began life as a copy of #1017203
download show line numbers debug dex old transpilations
Travelled to 3 computer(s): bhatertpkbcr, mowyntqkapby, mqqgnosmbjvj
No comments. add comment
| Snippet ID: | #1035249 |
| Snippet name: | antiFilterToSet - drop where predicate matches |
| Eternal ID of this version: | #1035249/1 |
| Text MD5: | 095bbcc92f2fcef5647fe241e6c12c36 |
| Transpilation MD5: | f705b13a86557e5bd080850c8bde341d |
| Author: | stefan |
| Category: | javax |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2022-04-27 11:29:56 |
| Source code size: | 317 bytes / 11 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 781 / 923 |
| Referenced in: | [show references] |