static <A> A optPar(ThreadLocal<A> tl, A defaultValue) { A a = tl.get(); if (a != null) { tl.set(null); ret a; } ret defaultValue; } static <A> A optPar(ThreadLocal<A> tl) { ret optPar(tl, null); } sO optPar(O[] params, S name) { ret optParam(params, name); } sO mapMethodLike optPar(S name, O[] params) { ret optParam(params, name); } sO mapMethodLike optPar(S name, Map params) { ret optParam(name, params); } static <A> A optPar(O[] params, S name, A defaultValue) { ret optParam(params, name, defaultValue); } static <A> A optPar(S name, O[] params, A defaultValue) { ret optParam(params, name, defaultValue); }
Began life as a copy of #1006091
download show line numbers debug dex old transpilations
Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1006679 |
Snippet name: | optPar - get optional parameter from ThreadLocal or params |
Eternal ID of this version: | #1006679/11 |
Text MD5: | 44bfbca0f635f56d74114ba020aa40ee |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2019-04-16 18:38:22 |
Source code size: | 680 bytes / 32 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 726 / 765 |
Version history: | 10 change(s) |
Referenced in: | [show references] |