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).

static long collectMaxLong(Collection c, S field) {
  long x = Long.MIN_VALUE;
  for (O o : unnull(c)) {
    Long l = cast getOpt(o, field);
    if (l != null)
      x = max(x, (long) l);
  }
  ret x;
}

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: 495 / 544
Version history: 2 change(s)
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)
#1009137 - collectMinLong - min of long field
#1017397 - collectMaxDouble - max of double field