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

6
LINES

< > BotCompany Repo | #1031509 // addToTwoCollections

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

Libraryless. Click here for Pure Java version (31L/1K).

static <A> bool addToTwoCollections(Cl<A> c1, Cl<A> c2, A a) {
  bool change;
  if (c1 != null && c1.add(a)) set change;
  if (c2 != null && c2.add(a)) set change;
  ret change;
}

Author comment

Began life as a copy of #1027936

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1031509
Snippet name: addToTwoCollections
Eternal ID of this version: #1031509/1
Text MD5: b41e24c3318ab63312e482be6c81a6d5
Transpilation MD5: bb295557631acec781bb44b1e3def778
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2021-06-17 05:02:48
Source code size: 184 bytes / 6 lines
Pitched / IR pitched: No / No
Views / Downloads: 209 / 279
Referenced in: [show references]