static <A extends Concept> A ccopyFields(Concept x, A y, S... fields) { if (x == null || y == null) ret y; if (empty(fields)) { // assume we should copy all fields for (S field : conceptFields(x)) cset(y, field, cget(x, field)); } else for (S field : fields) { O o = cget(x, field); if (o != null) cset(y, field, o); } ret y; }
Began life as a copy of #1002178
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: | #1013534 |
Snippet name: | ccopyFields - for concepts |
Eternal ID of this version: | #1013534/5 |
Text MD5: | fa2c9ad9f52970200286770c97f95a13 |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2019-02-13 15:47:04 |
Source code size: | 386 bytes / 13 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 486 / 541 |
Version history: | 4 change(s) |
Referenced in: | [show references] |