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

9
LINES

< > BotCompany Repo | #1025196 // addOrCreate - synonym of addDyn + createOrAddToSet

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

Libraryless. Click here for Pure Java version (9250L/51K).

meta-for Cl also as L {
  static <A> Cl<A> addOrCreate(Cl<A> l, A a) {
    ret addDyn(l, a);
  }
}

static <A> Set<A> addOrCreate(Set<A> l, A a) {
  ret createOrAddToSet(l, a);
}

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1025196
Snippet name: addOrCreate - synonym of addDyn + createOrAddToSet
Eternal ID of this version: #1025196/4
Text MD5: 43dae1ff85268e96acae433277fd0d81
Transpilation MD5: 96849ed25553c21be1ee5c9bb71cbb34
Author: stefan
Category:
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2022-09-01 22:36:00
Source code size: 188 bytes / 9 lines
Pitched / IR pitched: No / No
Views / Downloads: 287 / 376
Version history: 3 change(s)
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)
#1030949 - Transpiler output of #1031393