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

6
LINES

< > TinyBrain | #1005926 - addOrRemove

JavaX fragment (include)

static <A> void addOrRemove(Collection<A> c, A a, bool add) {
  if (add)
    c.add(a);
  else
    c.remove(a);
}

download  show line numbers  debug dex   

Travelled to 5 computer(s): cfunsshuasjs, gwrvuhgaqvyk, mqqgnosmbjvj, sawdedvomwva, tvejysmllsmz

No comments. add comment

Snippet ID: #1005926
Snippet name: addOrRemove
Eternal ID of this version: #1005926/1
Text MD5: 5e0652ad965f1e135899f3b51fcb11af
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2016-12-12 20:59:05
Source code size: 117 bytes / 6 lines
Pitched / IR pitched: No / No
Views / Downloads: 117 / 109
Referenced in: [show]