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

9
LINES

< > BotCompany Repo | #1021552 // ccopyFields2 - for concepts

JavaX fragment (include)

static <A extends Concept> A ccopyFields2(Concept x, A y, Iterable<S> fields) {
  if (x == null || y == null) ret y;
  for (S field : unnull(fields)) {
    O o = cget(x, field);
    if (o != null)
      cset(y, field, o);
  }
  ret y;
}

Author comment

Began life as a copy of #1013534

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1021552
Snippet name: ccopyFields2 - for concepts
Eternal ID of this version: #1021552/1
Text MD5: f60c8d082f25681e827a9e509b00f95b
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-02-17 19:25:09
Source code size: 244 bytes / 9 lines
Pitched / IR pitched: No / No
Views / Downloads: 319 / 326
Referenced in: [show references]