Libraryless. Click here for Pure Java version (13606L/92K).
1 | scope conceptsWithFieldGreaterThan_sorted . |
2 | |
3 | sbool #verbose; |
4 | |
5 | static <A extends Concept> Cl<A> nuLike conceptsWithFieldGreaterThan_sorted(Class<A> c, S field, O value) {
|
6 | ret conceptsWithFieldGreaterThan_sorted(db_mainConcepts(), c, field, value); |
7 | } |
8 | |
9 | static <A extends Concept> Cl<A> conceptsWithFieldGreaterThan_sorted(Concepts concepts, Class<A> c, S field, O value) {
|
10 | // indexed |
11 | IFieldIndex<A, O> index = concepts.getFieldIndex(c, field); |
12 | if (index cast ConceptFieldIndexDesc) |
13 | ret reverseInPlace(index.objectsWithValueGreaterThan(value)); |
14 | |
15 | // filter manually |
16 | if (verbose) |
17 | print("conceptsWithFieldGreaterThan: table scan of " + c + " for field " + field);
|
18 | ret sortByFieldInPlace(field, objectsWhereFieldGreaterThan(concepts.list(c), field, value)); |
19 | } |
Began life as a copy of #1028354
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: | #1029652 |
| Snippet name: | conceptsWithFieldGreaterThan_sorted - sort by field also |
| Eternal ID of this version: | #1029652/1 |
| Text MD5: | 78603b63a19fafedf2a28ea2bbd1a638 |
| Transpilation MD5: | b132073ec3cc5823203dfa1eda16cf40 |
| 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 21:04:17 |
| Source code size: | 795 bytes / 19 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 416 / 556 |
| Referenced in: | [show references] |