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

13
LINES

< > BotCompany Repo | #1029654 // lowestConceptByField

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

Libraryless. Click here for Pure Java version (13682L/93K).

static <A extends Concept> A nuLike lowestConceptByField(Class<A> c, S field) {
  ret lowestConceptByField(db_mainConcepts(), c, field);
}

static <A extends Concept> A lowestConceptByField(Concepts concepts, Class<A> c, S field) {
  // indexed
  IFieldIndex<A, O> index = concepts.getFieldIndex(c, field);
  if (index cast ConceptFieldIndexDesc) {
    Map.Entry e = ((NavigableMap) index.valueToObject.data).lastEntry();
    ret e == null ? null : (A) first((Cl) e.getValue());
  }
  ret lowestByField(field, concepts.list(c));
}

Author comment

Began life as a copy of #1029652

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1029654
Snippet name: lowestConceptByField
Eternal ID of this version: #1029654/5
Text MD5: f02a0e13a2329d6b6a81d63f8cdcd3c3
Transpilation MD5: d82abe66c700a5a905b6f9c7fa0166a9
Author: stefan
Category: javax / concepts
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-09-04 22:05:46
Source code size: 542 bytes / 13 lines
Pitched / IR pitched: No / No
Views / Downloads: 122 / 186
Version history: 4 change(s)
Referenced in: [show references]