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

15
LINES

< > BotCompany Repo | #1004782 // setOptAll

JavaX fragment (include)

static void setOptAll(O o, Map<S, O> fields) {
  if (fields == null) ret;
  for (S field : keys(fields))
    setOpt/*_flex*/(o, field, fields.get(field));
}

static void setOptAll(O o, O... values) {
  //values = expandParams(c.getClass(), values);
  warnIfOddCount(values);
  for (int i = 0; i+1 < l(values); i += 2) {
    S field = (S) values[i];
    O value = values[i+1];
    setOpt(o, field, value);
  }
}

download  show line numbers  debug dex  old transpilations   

Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, ddnzoavkxhuk, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1004782
Snippet name: setOptAll
Eternal ID of this version: #1004782/3
Text MD5: 3071cf343f789500daaf3d0635a64eff
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-05-06 15:52:09
Source code size: 424 bytes / 15 lines
Pitched / IR pitched: No / No
Views / Downloads: 748 / 744
Version history: 2 change(s)
Referenced in: [show references]