1 | // this syntax should be removed... |
2 | static O getThreadLocal(O o, S name) {
|
3 | ThreadLocal t = cast getOpt(o, name); |
4 | ret t != null ? t.get() : null; |
5 | } |
6 | |
7 | static <A> A getThreadLocal(ThreadLocal<A> tl) {
|
8 | ret tl == null ? null : tl!; |
9 | } |
10 | |
11 | static <A> A getThreadLocal(ThreadLocal<A> tl, A defaultValue) {
|
12 | ret or(getThreadLocal(tl), defaultValue); |
13 | } |
Began life as a copy of #1007890
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: | #1008758 |
| Snippet name: | getThreadLocal - synonym of getThreadLocalOpt + another version |
| Eternal ID of this version: | #1008758/6 |
| Text MD5: | 4cf9b5fc63ec6cad523016e18aeb1cf6 |
| Author: | stefan |
| Category: | javax |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2019-07-10 15:45:39 |
| Source code size: | 357 bytes / 13 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 1188 / 1288 |
| Version history: | 5 change(s) |
| Referenced in: | [show references] |