static class DerivedHashMap<A, B> extends AbstractMap<A, B> { Map<A, B> base; new HashMap<A, B> additions; *(Map<A, B> *base) {} public B get(Object key) { B b = additions.get(key); if (b != null) return b; return base.get(key); } public B put(A key, B value) { return additions.put(key, value); } public Set<Map.Entry<A,B>> entrySet() { throw fail(); } }
download show line numbers debug dex old transpilations
Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1001027 |
Snippet name: | class DerivedHashMap - base map + additions |
Eternal ID of this version: | #1001027/2 |
Text MD5: | f62569bb25f5084e80f584b14972080f |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2018-07-22 13:40:21 |
Source code size: | 426 bytes / 20 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 717 / 1456 |
Version history: | 1 change(s) |
Referenced in: | [show references] |