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

13
LINES

< > BotCompany Repo | #1021925 // withoutInstancesOf

JavaX fragment (include)

1  
static <A, B> L<A> withoutInstancesOf(Iterable<A> i, Class<B> c) {
2  
  new L<A> l;
3  
  if (i == null) ret l;
4  
  c = primitiveToBoxedTypeOpt(c);
5  
  for (A o : i)
6  
    if (!isInstance(c, o))
7  
      l.add(o);
8  
  ret l;
9  
}
10  
11  
static <A, B> L<A> nuLike withoutInstancesOf(Class<B> c, Iterable<A> i) {
12  
  ret withoutInstancesOf(i, c);
13  
}

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: 278 / 321
Version history: 3 change(s)
Referenced in: [show references]