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

14
LINES

< > BotCompany Repo | #1003807 // _get - (partial) synonym of get - when get clashes with another method

JavaX fragment (include)

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

static O _get(O o, S field) {
  ret get(o, field);
}

static O mapMethodLike _get(S field, O o) {
  ret get(o, field);
}
static <A> A _get(A[] l, int idx) {
  ret idx >= 0 && idx < l(l) ? l[idx] : null;
}

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1003807
Snippet name: _get - (partial) synonym of get - when get clashes with another method
Eternal ID of this version: #1003807/3
Text MD5: 2e8ef1c544c87d3fa88af8670d0735f6
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-02-23 00:16:13
Source code size: 320 bytes / 14 lines
Pitched / IR pitched: No / No
Views / Downloads: 752 / 1064
Version history: 2 change(s)
Referenced in: [show references]