1 | // returns number of deleted elements |
2 | static int deleteWhere(Collection c, O... data) { |
3 | int n = 0; |
4 | Iterator i = c.iterator(); |
5 | while (i.hasNext()) |
6 | if (checkFields(i.next(), data)) { |
7 | i.remove(); |
8 | ++n; |
9 | } |
10 | ret n; |
11 | } |
Began life as a copy of #1003173
download show line numbers debug dex old transpilations
Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, ddnzoavkxhuk, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1004337 |
Snippet name: | deleteWhere - delete elements of a collection matching certain fields |
Eternal ID of this version: | #1004337/1 |
Text MD5: | 2f3a6bb6c213f6d8cb175f613e2f069e |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2016-08-13 18:36:20 |
Source code size: | 246 bytes / 11 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 449 / 486 |
Referenced in: | [show references] |