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

9
LINES

< > BotCompany Repo | #1029595 // cSmartSet_withConverter - set fields in Concept object with converter

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

Libraryless. Click here for Pure Java version (13354L/91K).

// returns number of changes
static int cSmartSet_withConverter(bool verbose default false, ValueConverterForField converter, 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 (cSmartSetField_withConverter(c, (S) values[i], values[i+1], converter, verbose)) ++changes;
  ret changes;
}

Author comment

Began life as a copy of #1026008

download  show line numbers  debug dex  old transpilations   

Travelled to 7 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv

No comments. add comment

Snippet ID: #1029595
Snippet name: cSmartSet_withConverter - set fields in Concept object with converter
Eternal ID of this version: #1029595/4
Text MD5: 9b2a70a1b474dee58241d60cfff0487a
Transpilation MD5: 0dad1c4f9f96da83c63e98f26fd36d71
Author: stefan
Category: javax / concepts
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-11-02 11:49:46
Source code size: 430 bytes / 9 lines
Pitched / IR pitched: No / No
Views / Downloads: 217 / 321
Version history: 3 change(s)
Referenced in: [show references]