Libraryless. Click here for Pure Java version (17222L/106K).
1 | static <A extends Concept> A ccopyFields_withConverter_pcall(Concept x, A y, S... fields) { |
2 | if (x == null || y == null) ret y; |
3 | if (empty(fields)) { // assume we should copy all fields |
4 | for (S field : conceptFields(x)) |
5 | pcall cSmartSetField_withConverter(y, field, cget(x, field)); |
6 | } else |
7 | for (S field : fields) { |
8 | O o = cget(x, field); |
9 | if (o != null) |
10 | pcall cSmartSetField_withConverter(y, field, o); |
11 | } |
12 | ret y; |
13 | } |
Began life as a copy of #1031344
download show line numbers debug dex old transpilations
Travelled to 4 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, vouqrxazstgt
No comments. add comment
Snippet ID: | #1031815 |
Snippet name: | ccopyFields_withConverter_pcall - for concepts |
Eternal ID of this version: | #1031815/3 |
Text MD5: | a89d06835f3f52cbffc00108a4eb7e37 |
Transpilation MD5: | 6afad4b209a404595f2b54ea24fb7b07 |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2021-07-02 20:55:40 |
Source code size: | 466 bytes / 13 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 140 / 199 |
Version history: | 2 change(s) |
Referenced in: | [show references] |