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

14
LINES

< > BotCompany Repo | #1013540 // navigableMultiMapValuesIterator - iterates concurrently; doesn't handle null values; only for TreeMaps for now

JavaX fragment (include)

1  
static <A, B> IterableIterator<B> navigableMultiMapValuesIterator(final MultiMap<A, B> mm) {
2  
  ret iteratorFromFunction(new F0<B>() {
3  
    Iterator<L<B>> it = concurrentlyIterateValues((NavigableMap) mm.data);
4  
    Iterator<B> it2;
5  
    
6  
    public B get() {
7  
      while (it2 == null || !it2.hasNext()) {
8  
        if (!it.hasNext()) null;
9  
        it2 = concurrentlyIterateList(it.next());
10  
      }
11  
      ret it2.next();
12  
    }
13  
  });
14  
}

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1013540
Snippet name: navigableMultiMapValuesIterator - iterates concurrently; doesn't handle null values; only for TreeMaps for now
Eternal ID of this version: #1013540/6
Text MD5: 630f57406e491e6f3cb8b327ec70bf9e
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-01-08 09:05:40
Source code size: 441 bytes / 14 lines
Pitched / IR pitched: No / No
Views / Downloads: 450 / 500
Version history: 5 change(s)
Referenced in: [show references]