1 | static Pair<Bool, S> generalDefinitions_addMultiple(Collection<Pair<S>> list) { |
2 | MultiMap<S, Pair<S>> mm = mechMultiMapPairsCI(generalDefinitions_listName()); |
3 | |
4 | new LinkedHashMap toAdd; |
5 | for (Pair<S> p : list) |
6 | if (nempty(p.a) && nempty(p.b) && !mapPairB(f dropGlobalID, mm.get(p.a)).contains(p)) |
7 | toAdd.put(p.a, appendGlobalID(p.b)); |
8 | |
9 | if (empty(toAdd)) |
10 | ret pair(false, "Nothing to do"); |
11 | |
12 | addToMechMap(generalDefinitions_listName(), toAdd); |
13 | ret pair(true, print(n2(toAdd, "definition") + " added")); |
14 | } |
Began life as a copy of #1017007
download show line numbers debug dex old transpilations
Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1017072 |
Snippet name: | generalDefinitions_addMultiple |
Eternal ID of this version: | #1017072/5 |
Text MD5: | ad8de3793d29fc0c44604072f5e33555 |
Author: | stefan |
Category: | javax / a.i. |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2018-07-11 17:44:42 |
Source code size: | 541 bytes / 14 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 350 / 373 |
Version history: | 4 change(s) |
Referenced in: | [show references] |