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

9
LINES

< > BotCompany Repo | #1009136 // collectMaxLong - max of long field

JavaX fragment (include) [tags: use-pretranspiled]

Libraryless. Click here for Pure Java version (4558L/26K).

1  
static long collectMaxLong(Collection c, S field) {
2  
  long x = Long.MIN_VALUE;
3  
  for (O o : unnull(c)) {
4  
    Long l = cast getOpt(o, field);
5  
    if (l != null)
6  
      x = max(x, (long) l);
7  
  }
8  
  ret x;
9  
}

Author comment

Began life as a copy of #1004865

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: #1009136
Snippet name: collectMaxLong - max of long field
Eternal ID of this version: #1009136/3
Text MD5: 2d2a2ac62f5ae11c67574ba41df84a28
Transpilation MD5: 26089da72346f5a896676c279e68a1f0
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2021-11-14 21:45:33
Source code size: 212 bytes / 9 lines
Pitched / IR pitched: No / No
Views / Downloads: 590 / 659
Version history: 2 change(s)
Referenced in: [show references]