Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

14
LINES

< > BotCompany Repo | #1033025 // toIterator

JavaX fragment (include) [tags: use-pretranspiled]

Libraryless. Click here for Pure Java version (3878L/22K).

1  
static ItIt<Short> toIterator(ShortIterator it) {
2  
  ret it == null ?: new ItIt<Short> {
3  
    public bool hasNext() { ret it.hasNext(); }
4  
    public Short next() { ret it.next(); }
5  
  };
6  
}
7  
8  
static CloseableItIt<Short> toIterator(CloseableShortIterator it) {
9  
  ret it == null ?: new CloseableItIt<Short> {
10  
    close { pClose(it); }
11  
    public bool hasNext() { ret it.hasNext(); }
12  
    public Short next() { ret it.next(); }
13  
  };
14  
}

Author comment

Began life as a copy of #1029302

download  show line numbers  debug dex  old transpilations   

Travelled to 4 computer(s): bhatertpkbcr, ekrmjmnbrukm, mowyntqkapby, mqqgnosmbjvj

No comments. add comment

Snippet ID: #1033025
Snippet name: toIterator
Eternal ID of this version: #1033025/6
Text MD5: 9ed65d572d5360f83b2ba853556d9524
Transpilation MD5: ea16ba308034e28adc00073d15c4e6a1
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2021-10-11 12:28:29
Source code size: 438 bytes / 14 lines
Pitched / IR pitched: No / No
Views / Downloads: 158 / 226
Version history: 5 change(s)
Referenced in: [show references]