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

15
LINES

< > BotCompany Repo | #1015251 // setOptAllDyn old

JavaX fragment (include)

sbool setOptAllDyn_debug;

static void setOptAllDyn(DynamicObject o, Map<S, O> fields) {
  if (fields == null) ret;
  for (S field : keys(fields)) {
    O val = fields.get(field);
    bool has = hasField(o, field);
    if (has)
      setOpt(o, field, val);
    else {
      o.fieldValues.put(intern(field), val);
      if (setOptAllDyn_debug) print("setOptAllDyn added dyn " + field + " to " + o + " [value: " + val + ", fieldValues = " + systemHashCode(o.fieldValues) + ", " + struct(keys(o.fieldValues)) + "]");
    }
  }
}

Author comment

Began life as a copy of #1005268

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: #1015251
Snippet name: setOptAllDyn old
Eternal ID of this version: #1015251/1
Text MD5: 1b2bf8cd13988db411180c1d88e753d0
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-05-11 02:13:29
Source code size: 539 bytes / 15 lines
Pitched / IR pitched: No / No
Views / Downloads: 364 / 407
Referenced in: