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

13
LINES

< > BotCompany Repo | #1021925 // withoutInstancesOf

JavaX fragment (include)

static <A, B> L<A> withoutInstancesOf(Iterable<A> i, Class<B> c) {
  new L<A> l;
  if (i == null) ret l;
  c = primitiveToBoxedTypeOpt(c);
  for (A o : i)
    if (!isInstance(c, o))
      l.add(o);
  ret l;
}

static <A, B> L<A> nuLike withoutInstancesOf(Class<B> c, Iterable<A> i) {
  ret withoutInstancesOf(i, c);
}

Author comment

Began life as a copy of #1004443

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1021925
Snippet name: withoutInstancesOf
Eternal ID of this version: #1021925/4
Text MD5: 1aea33806b6bf5f8576456aa3b85ecc9
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2021-09-02 17:57:38
Source code size: 329 bytes / 13 lines
Pitched / IR pitched: No / No
Views / Downloads: 174 / 213
Version history: 3 change(s)
Referenced in: [show references]