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

8
LINES

< > BotCompany Repo | #1012762 // firstNotNull

JavaX fragment (include)

static <A> A firstNotNull(Iterable<A> c) {
  Iterator<A> it = c.iterator();
  while (it.hasNext()) {
    A a = it.next();
    if (a != null) ret a;
  }
  null;
}

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: #1012762
Snippet name: firstNotNull
Eternal ID of this version: #1012762/4
Text MD5: e2b875455c3716c2175644aacc99df1a
Author: stefan
Category: javax / collections
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-12-13 01:46:00
Source code size: 168 bytes / 8 lines
Pitched / IR pitched: No / No
Views / Downloads: 385 / 420
Version history: 3 change(s)
Referenced in: [show references]