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).

sclass MapI<A, B> extends ItIt<B> {
  IF1<A, B> f;
  Iterator<A> it;
  
  *(IF1<A, B> *f, Iterator<A> *it) {}
  
  public bool hasNext() {
    ret it.hasNext();
  }
  
  public B next() {
    ret f.get(it.next());
  }
}

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: 151 / 227
Version history: 2 change(s)
Referenced in: #1003674 - Standard Classes + Interfaces (LIVE continued in #1034167)
#1036114 - CloseableMapI - mapping iterator with closing