static <A> long exhaustIterator(Iterator<A> it) { long n = 0; if (it != null) while ping (it.hasNext()) { ++n; it.next(); } ret n; }
download show line numbers debug dex old transpilations
Travelled to 8 computer(s): bhatertpkbcr, cfunsshuasjs, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv
No comments. add comment
Snippet ID: | #1023183 |
Snippet name: | exhaustIterator - step through whole iterator and discard items |
Eternal ID of this version: | #1023183/3 |
Text MD5: | b1d1ff0d9ea561892d88d2117cf88a17 |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2020-02-26 12:45:48 |
Source code size: | 142 bytes / 5 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 350 / 352 |
Version history: | 2 change(s) |
Referenced in: | #1006654 - Standard functions list 2 (LIVE, continuation of #761) |