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

6
LINES

< > BotCompany Repo | #1030760 // crenameField_noOverwrite

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

Libraryless. Click here for Pure Java version (14722L/94K).

svoid crenameField_noOverwrite(Concept c, S oldField, S newField) {
  if (c == null || eq(oldField, newField)) ret;
  O value = cget(c, oldField);
  if (newField != null && cget(c, newField) == null) cset(c, newField, value);
  cset(c, oldField, null);
}

Author comment

Began life as a copy of #1030756

download  show line numbers  debug dex  old transpilations   

Travelled to 4 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, vouqrxazstgt

No comments. add comment

Snippet ID: #1030760
Snippet name: crenameField_noOverwrite
Eternal ID of this version: #1030760/2
Text MD5: 22e074540246db0c5b1639272845e3d6
Transpilation MD5: 2fff0161e567cfde0fb4656a1f4810aa
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2021-03-19 14:46:36
Source code size: 259 bytes / 6 lines
Pitched / IR pitched: No / No
Views / Downloads: 178 / 266
Version history: 1 change(s)
Referenced in: [show references]