static int intSum(Collection c, S field) { int sum = 0; for (O o : unnull(c)) sum += toInt(getOpt(o, field)); ret sum; } static int intSum(Iterable<Int> l) { int sum = 0; for (Int i : unnull(l)) if (i != null) sum += i; ret sum; } static int intSum(int... l) { int sum = 0; for (int i : unnull(l)) sum += i; ret sum; }
download show line numbers debug dex old transpilations
Travelled to 15 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, sawdedvomwva, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
| Snippet ID: | #1006064 |
| Snippet name: | intSum - add field of list << great wording |
| Eternal ID of this version: | #1006064/5 |
| Text MD5: | 9a10721757938fbb9bd24061ad121c17 |
| Author: | stefan |
| Category: | javax |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2022-03-08 08:10:48 |
| Source code size: | 369 bytes / 20 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 1143 / 1201 |
| Version history: | 4 change(s) |
| Referenced in: | #1006065 - intMax - max of field of list << great wording #1006654 - Standard functions list 2 (LIVE, continuation of #761) #1018930 - intSumAsLong #1019131 - doubleSum #1036089 - ubyteSum |