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

17
LINES

< > BotCompany Repo | #1023559 // uniqCI2 - get or make concept with certain parameters, ignoring case; return whether it was new

JavaX fragment (include)

1  
// TODO: merge with uniqCI2_sync
2  
3  
static <A extends Concept> Pair<A, Bool> nuLike uniqCI2(Class<A> c, O... params) {
4  
  ret uniqCI2(db_mainConcepts(), c, params);
5  
}
6  
7  
static <A extends Concept> Pair<A, Bool> uniqCI2(Concepts cc, Class<A> c, O... params) {
8  
  params = expandParams(c, params);
9  
  A x = findConceptWhereCI(cc, c, params);
10  
  if (x == null) {
11  
    x = unlisted(c);
12  
    csetAll(x, params);
13  
    cc.register(x);
14  
    ret pair(x, true);
15  
  }
16  
  ret pair(x, false);
17  
}

Author comment

Began life as a copy of #1008467

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1023559
Snippet name: uniqCI2 - get or make concept with certain parameters, ignoring case; return whether it was new
Eternal ID of this version: #1023559/5
Text MD5: 57bc8a1b78739eb558ea90471c803549
Author: stefan
Category: javax / concepts
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2021-04-12 18:37:28
Source code size: 483 bytes / 17 lines
Pitched / IR pitched: No / No
Views / Downloads: 205 / 266
Version history: 4 change(s)
Referenced in: [show references]