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

14
LINES

< > BotCompany Repo | #1035103 // MapI - mapping iterator

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

Libraryless. Click here for Pure Java version (7502L/42K).

1  
sclass MapI<A, B> extends ItIt<B> {
2  
  IF1<A, B> f;
3  
  Iterator<A> it;
4  
  
5  
  *(IF1<A, B> *f, Iterator<A> *it) {}
6  
  
7  
  public bool hasNext() {
8  
    ret it.hasNext();
9  
  }
10  
  
11  
  public B next() {
12  
    ret f.get(it.next());
13  
  }
14  
}

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1035103
Snippet name: MapI - mapping iterator
Eternal ID of this version: #1035103/3
Text MD5: e6abd813776f610e61b986364b186d2e
Transpilation MD5: b808e98fcc24646bf685ff12ac2807a1
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:34:37
Source code size: 234 bytes / 14 lines
Pitched / IR pitched: No / No
Views / Downloads: 150 / 227
Version history: 2 change(s)
Referenced in: [show references]