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

16
LINES

< > BotCompany Repo | #1008467 // uniq2 - get or make concept with certain parameters; return whether it was new. now synced

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

Transpiled version (12728L) is out of date.

static <A extends Concept> Pair<A, Bool> nuLike uniq2(Class<A> c, O... params) {
  ret uniq2(db_mainConcepts(), c, params);
}

static <A extends Concept> Pair<A, Bool> uniq2(Concepts cc, Class<A> c, O... params) {
  temp tempDBLock(cc);
  params = expandParams(c, params);
  A x = findConceptWhere(cc, c, params);
  if (x == null) {
    x = unlisted(c);
    csetAll(x, params);
    cc.register(x);
    ret pair(x, true);
  }
  ret pair(x, false);
}

Author comment

Began life as a copy of #1005040

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1008467
Snippet name: uniq2 - get or make concept with certain parameters; return whether it was new. now synced
Eternal ID of this version: #1008467/8
Text MD5: 1566a88840574de490906028190cbca2
Author: stefan
Category: javax / concepts
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-10-26 12:11:41
Source code size: 463 bytes / 16 lines
Pitched / IR pitched: No / No
Views / Downloads: 687 / 794
Version history: 7 change(s)
Referenced in: [show references]