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

5
LINES

< > BotCompany Repo | #1009870 // copyListeners - copy fields named "on..."

JavaX fragment (include)

static void copyListeners(O a, O b) {
  for (S f : fieldNames(a))
    if (l(f) > 2 && startsWith(f, "on") && isUpperCase(f.charAt(2)))
      setOpt(b, f, getOpt(a, f));
}

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: #1009870
Snippet name: copyListeners - copy fields named "on..."
Eternal ID of this version: #1009870/2
Text MD5: 29794aa6d7723c559b63fe5e8fae21eb
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-08-22 19:06:08
Source code size: 174 bytes / 5 lines
Pitched / IR pitched: No / No
Views / Downloads: 552 / 556
Version history: 1 change(s)
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)