Libraryless. Click here for Pure Java version (12753L/86K).
1 | static Concept getConcept(long id) { |
2 | ret db_mainConcepts().getConcept(id); |
3 | } |
4 | |
5 | static Concept getConcept(Concepts concepts, long id) { |
6 | ret concepts.getConcept(id); |
7 | } |
8 | |
9 | static <A extends Concept> A nuLike getConcept(Class<A> cc, long id) { |
10 | ret getConcept(db_mainConcepts(), cc, id); |
11 | } |
12 | |
13 | static <A extends Concept> A getConcept(Concepts concepts, Class<A> cc, long id) { |
14 | Concept c = concepts.getConcept(id); |
15 | if (c == null) null; |
16 | if (!isInstance(cc, c)) |
17 | fail("Can't convert concept: " + getClassName(c) + " -> " + getClassName(cc) + " (" + id + ")"); |
18 | ret (A) c; |
19 | } |
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: | #1006614 |
Snippet name: | getConcept |
Eternal ID of this version: | #1006614/5 |
Text MD5: | 53b634687960c030d798db33f64b58bd |
Transpilation MD5: | 1e1e0b8b5aa523785be9991a000c321f |
Author: | stefan |
Category: | javax / concepts |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2020-06-10 14:09:09 |
Source code size: | 596 bytes / 19 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 717 / 793 |
Version history: | 4 change(s) |
Referenced in: | [show references] |