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

7
LINES

< > BotCompany Repo | #1035102 // arrayIterator

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

Libraryless. Click here for Pure Java version (65L/1K).

static <A> ItIt<A> arrayIterator(A[] l) {
  ret l == null ?: new ItIt<A> {
    int i = 0;
    public bool hasNext() { ret i < l.length; }
    public A next() { ret l[i++]; }
  };
}

Author comment

Began life as a copy of #1029311

download  show line numbers  debug dex  old transpilations   

Travelled to 3 computer(s): bhatertpkbcr, mowyntqkapby, mqqgnosmbjvj

No comments. add comment

Snippet ID: #1035102
Snippet name: arrayIterator
Eternal ID of this version: #1035102/3
Text MD5: f00bc0ff91bc5341e0a8e64f2682ba9b
Transpilation MD5: 02f3de4987ec2aabc46825a8bd78d04d
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2022-03-30 01:24:51
Source code size: 186 bytes / 7 lines
Pitched / IR pitched: No / No
Views / Downloads: 144 / 203
Version history: 2 change(s)
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)