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

8
LINES

< > BotCompany Repo | #1021298 // addAllAndReturnNew

JavaX fragment (include)

static <A> L<A> addAllAndReturnNew(Collection<A> c, Collection<A> b) {
  if (c == null || b == null) ret emptyList();
  new L<A> newEntries;
  for (A a : b)
    if (c.add(a))
      newEntries.add(a);
  ret newEntries;
}

Author comment

Began life as a copy of #1015243

download  show line numbers  debug dex  old transpilations   

Travelled to 7 computer(s): bhatertpkbcr, cfunsshuasjs, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1021298
Snippet name: addAllAndReturnNew
Eternal ID of this version: #1021298/3
Text MD5: 89ff8a5ad749a61547a4e3867c306eee
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-02-07 16:50:14
Source code size: 226 bytes / 8 lines
Pitched / IR pitched: No / No
Views / Downloads: 359 / 401
Version history: 2 change(s)
Referenced in: [show references]