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

11
LINES

< > BotCompany Repo | #1016042 // enumerationToIterator

JavaX fragment (include)

static <A> IterableIterator<A> enumerationToIterator(final Enumeration<A> e) {
  ret e == null ? null : new IterableIterator {
    public bool hasNext() {
      ret e.hasMoreElements();
    }
    
    public A next() {
      ret e.nextElement();
    }
  };
}

download  show line numbers  debug dex  old transpilations   

Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, ekrmjmnbrukm, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1016042
Snippet name: enumerationToIterator
Eternal ID of this version: #1016042/1
Text MD5: af307732a156c6782f3360bef1d773bb
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-06-03 13:16:23
Source code size: 268 bytes / 11 lines
Pitched / IR pitched: No / No
Views / Downloads: 286 / 348
Referenced in: [show references]