1 | static O getOptDyn(DynamicObject o, S field) { |
2 | if (o == null || o.fieldValues == null) null; |
3 | O val = o.fieldValues.get(field); |
4 | ret val != null ? val : getOpt(o, field); |
5 | } |
6 | |
7 | static O getOptDyn(O o, S field) { |
8 | ret o instanceof DynamicObject ? getOptDyn((DynamicObject) o, field) : getOpt(o, field); |
9 | } |
Began life as a copy of #1001101
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, xrpafgyirdlv
No comments. add comment
Snippet ID: | #1005273 |
Snippet name: | getOptDyn - getOpt + get dynamic fields |
Eternal ID of this version: | #1005273/4 |
Text MD5: | be87b8686616081f0796b5f45b3e3184 |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2020-07-12 13:16:58 |
Source code size: | 313 bytes / 9 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 617 / 589 |
Version history: | 3 change(s) |
Referenced in: | [show references] |