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

3
LINES

< > BotCompany Repo | #1012441 // listGet - get from list if list != null and index in range

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

Libraryless. Click here for Pure Java version (33L/1K).

static <A> A listGet(L<A> l, int idx) {
  ret l != null && idx >= 0 && idx < l.size() ? l.get(idx) : null;
}

Author comment

Began life as a copy of #1003807

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1012441
Snippet name: listGet - get from list if list != null and index in range
Eternal ID of this version: #1012441/2
Text MD5: e15ef23274070f655ed01f2dc544b466
Transpilation MD5: 68fe9db6e2962536582022cb2862d25a
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2022-07-01 04:54:14
Source code size: 110 bytes / 3 lines
Pitched / IR pitched: No / No
Views / Downloads: 471 / 569
Version history: 1 change(s)
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)