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

30
LINES

< > BotCompany Repo | #1031055 - ConceptShadow

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

Transpiled version (15621L) is out of date.

sclass ConceptShadow {
  Map map;

  *(Concept c) {
    map = conceptShadow_rawMap(c);
    map = toSortedArrayBasedMap(mapValues convertValue(map));
  }
  
  O convertValue(O o) {
    if (o cast Concept.Ref)
      ret conceptIDObject(o!);
    if (o instanceof Concept.RefL)
      ret lmap conceptIDObject((L<Concept>) o);
    if (o cast Concept)
      ret ConceptID(o);
    ret o;
  }
  
  toString { ret "ConceptShadow " + map; }
  
  O get(O key) { ret mapGet(map, key); }
  
  public bool equals(O o) {
    if (o cast ConceptShadow)
      ret eq(map, o.map);
    false;
  }
  
  long id() { ret toLong(get("id")); }
}

download  show line numbers  debug dex  old transpilations   

Travelled to 3 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx

No comments. add comment

Snippet ID: #1031055
Snippet name: ConceptShadow
Eternal ID of this version: #1031055/18
Text MD5: 5edc3137b09f9b814a81eff890c9328b
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2021-05-01 15:46:01
Source code size: 649 bytes / 30 lines
Pitched / IR pitched: No / No
Views / Downloads: 64 / 135
Version history: 17 change(s)
Referenced in: [show references]

Formerly at http://tinybrain.de/1031055 & http://1031055.tinybrain.de