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

16
LINES

< > BotCompany Repo | #1009257 - cset - set fields in Concept object (with notification of DB)

JavaX fragment (include) [tags: use-pretranspiled]

Libraryless. Click here for Pure Java version (12543L/85K).

// returns number of changes
static int cset(Concept c, O... values) ctex {
  if (c == null) ret 0;
  warnIfOddCount(values = expandParams(c.getClass(), values));
  int changes = 0;
  for (int i = 0; i+1 < l(values); i += 2)
    if (_csetField(c, (S) values[i], values[i+1])) ++changes;
  ret changes;
}

static int cset(Iterable<? extends Concept> l, O... values) {
  int changes = 0;
  fOr (Concept c : l)
    changes += cset(c, values);
  ret changes;
}

download  show line numbers  debug dex   

Travelled to 9 computer(s): aoiabmzegqzx, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, tslmcundralx, tvejysmllsmz

No comments. add comment

Snippet ID: #1009257
Snippet name: cset - set fields in Concept object (with notification of DB)
Eternal ID of this version: #1009257/13
Text MD5: 4d925aaa4484f834b7816eecce6b4904
Transpilation MD5: 6127b3e309eda2e927bfd355f94ea679
Author: stefan
Category: javax / concepts
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-11-07 18:00:32
Source code size: 471 bytes / 16 lines
Pitched / IR pitched: No / No
Views / Downloads: 397 / 479
Version history: 12 change(s)
Referenced in: [show references]

Formerly at http://tinybrain.de/1009257 & http://1009257.tinybrain.de