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

6
LINES

< > BotCompany Repo | #1002316 // findByField

JavaX fragment (include)

1  
static <A> A findByField(Collection<A> c, S field, O value) {
2  
  for (A a : c)
3  
    if (eq(getOpt(a, field), value))
4  
      ret a;
5  
  ret null;
6  
}

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: #1002316
Snippet name: findByField
Eternal ID of this version: #1002316/1
Text MD5: 5dac261b82f1ffe8a176337dc45d5e30
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2016-01-04 18:46:38
Source code size: 146 bytes / 6 lines
Pitched / IR pitched: No / Yes
Views / Downloads: 593 / 1082
Referenced in: [show references]