sbool conceptsSortedByField_verbose; // tries to use index if possible // result is sorted if index was used // result is always an independent collection static Cl nuLike conceptsWithFieldLessThan (Class c, S field, O value) { ret conceptsWithFieldLessThan(db_mainConcepts(), c, field, value); } static Cl conceptsWithFieldLessThan(Concepts concepts, Class c, S field, O value) { // indexed IFieldIndex index = concepts.getFieldIndex(c, field); if (index cast ConceptFieldIndexDesc) synchronized(index.mutex()) { ret reverseInPlace(valuesList(((SortedMap) index.valueToObject).tailMap(value, false))); } // filter manually ret filter(concepts.list(c), o -> cmp(getOpt(o, field), value) < 0); }