static O getOptDyn(DynamicObject o, S field) { if (o == null || o.fieldValues == null) null; O val = o.fieldValues.get(field); ret val != null ? val : getOpt(o, field); } static O getOptDyn(O o, S field) { ret o instanceof DynamicObject ? getOptDyn((DynamicObject) o, field) : getOpt(o, field); }
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: | 616 / 588 |
Version history: | 3 change(s) |
Referenced in: | #1006654 - Standard functions list 2 (LIVE, continuation of #761) #1031529 - getOptDynOnly - getOpt only from dynamic field |