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

17
LINES

< > BotCompany Repo | #1013539 - ConceptFieldIndexDesc - uses TreeMap

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

Libraryless. Click here for Pure Java version (15449L/99K).

final sclass ConceptFieldIndexDesc<A extends Concept, Val> extends ConceptFieldIndexBase<A, Val> {
  *(Class<A> cc, S field) { super(cc, field); }
  *(Concepts concepts, Class<A> cc, S field) { super(concepts, cc, field); }
  
  void init {
    valueToObject = treeMultiSetMap(reverseOrder());
  }
  
  void register {
    concepts.addFieldIndex(cc, field, this);
  }
  
  synchronized L<A> objectsWithValueGreaterThan(O value) {
    SortedMap<O, Set<A>> subMap = ((SortedMap<O, Set<A>>) valueToObject.data).headMap(value);
    ret concatLists(values(subMap));
  }
}

Author comment

Began life as a copy of #1008616

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1013539
Snippet name: ConceptFieldIndexDesc - uses TreeMap
Eternal ID of this version: #1013539/23
Text MD5: 8e36d74520cae086f89f54c319ba3cfd
Transpilation MD5: 8962234e3e6830f798cfa0950d088e14
Author: stefan
Category: javax / concepts
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2021-05-03 22:09:49
Source code size: 582 bytes / 17 lines
Pitched / IR pitched: No / No
Views / Downloads: 377 / 934
Version history: 22 change(s)
Referenced in: [show references]

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