1 | static <A> int iteratorCount_int_close(Iterator<A> i) ctex { |
2 | int n = 0; |
3 | if (i != null) while (i.hasNext()) { i.next(); ++n; } |
4 | if (i cast AutoCloseable) i.close(); |
5 | ret n; |
6 | } |
Began life as a copy of #1024442
download show line numbers debug dex old transpilations
Travelled to 8 computer(s): bhatertpkbcr, mowyntqkapby, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt, wnsclhtenguj
No comments. add comment
Snippet ID: | #1024443 |
Snippet name: | iteratorCount_int_close |
Eternal ID of this version: | #1024443/3 |
Text MD5: | 716f88556ffdc36d5cb4804f6fdfd9f8 |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2019-08-12 20:55:22 |
Source code size: | 184 bytes / 6 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 364 / 477 |
Version history: | 2 change(s) |
Referenced in: | [show references] |