Libraryless. Click here for Pure Java version (3998L/23K).
1 | sclass TreeHasKeyMap<A, B extends HasKey<A>> extends HasKeyMap<A, B> { |
2 | *() { init(); } |
3 | *(Iterable<B> l) { init(); addAll(l); } |
4 | |
5 | void init { map = new TreeMap; } |
6 | |
7 | TreeMap<A, B> map() { ret (TreeMap) map; } |
8 | |
9 | A lastKey() { ret main lastKey(map()); } |
10 | |
11 | B higher(B a) { ret a == null ?: higherValue(map(), a.getKey()); } |
12 | } |
Began life as a copy of #1032972
download show line numbers debug dex old transpilations
Travelled to 4 computer(s): bhatertpkbcr, ekrmjmnbrukm, mowyntqkapby, mqqgnosmbjvj
No comments. add comment
Snippet ID: | #1033027 |
Snippet name: | TreeHasKeyMap - sorted HasKeyMap |
Eternal ID of this version: | #1033027/10 |
Text MD5: | 0c5545589e9eb7608a8da3459bca71fc |
Transpilation MD5: | 5d424e9fc519adf8f541ae33b1b1858f |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2021-10-18 04:22:07 |
Source code size: | 348 bytes / 12 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 177 / 317 |
Version history: | 9 change(s) |
Referenced in: | [show references] |