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

19
LINES

< > BotCompany Repo | #1014404 - removeAll

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

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

static <A> void removeAll(Collection<A> a, Collection<A> b) {
  if (a != null && b != null) a.removeAll(b);
}

static <A, B> void removeAll(Map<A, B> a, Collection<A> b) {
  if (a != null && b != null)
    for (A x : b)
      a.remove(x);
}

static <A, B extends A> bool removeAll(Collection<A> c, B... b) {
  ret c != null && b != null && c.removeAll(Arrays.asList(b));
}

static <A, B> void removeAll(Map<A, B> a, A... b) {
  if (a != null && b != null)
    for (A x : b)
      a.remove(x);
}

Author comment

Began life as a copy of #1011634

download  show line numbers  debug dex  old transpilations   

Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1014404
Snippet name: removeAll
Eternal ID of this version: #1014404/5
Text MD5: b1f162ad4dce16912cf5e225469df1bd
Transpilation MD5: 76829d40dcca198d1c46b236e8df6e7d
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2021-03-19 17:39:56
Source code size: 512 bytes / 19 lines
Pitched / IR pitched: No / No
Views / Downloads: 241 / 302
Version history: 4 change(s)
Referenced in: [show references]