sclass LatestAppearance<A> { Set<A> lastSet; new Map<A, Long> latestAppearance; L<A> recordAndSort(Set<A> set) { for (A a : setMinusSet(set, lastSet)) latestAppearance.put(a, sysNow()); lastSet = set; ret sortedByMapLookupDesc(set, latestAppearance); } }
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, vouqrxazstgt
No comments. add comment
Snippet ID: | #1015111 |
Snippet name: | LatestAppearance - keeps track of when things appeared last |
Eternal ID of this version: | #1015111/2 |
Text MD5: | 6e924d38bac421a5cebafb7f72849c48 |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2018-05-08 13:57:13 |
Source code size: | 291 bytes / 11 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 290 / 867 |
Version history: | 1 change(s) |
Referenced in: | [show references] |