1 | static <A> Set<A> setWithNotify(final Runnable onChange) { |
2 | ret setWithNotify(new HashSet, onChange); |
3 | } |
4 | |
5 | static <A> Set<A> setWithNotify(Set<A> set, final Runnable onChange) { |
6 | ret new NotifyingSet<A>(set) { |
7 | void change() { onChange.run(); } |
8 | }; |
9 | } |
Began life as a copy of #1012662
download show line numbers debug dex old transpilations
Travelled to 8 computer(s): bhatertpkbcr, cfunsshuasjs, gwrvuhgaqvyk, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1020632 |
Snippet name: | setWithNotify - returns synchronized notifying set |
Eternal ID of this version: | #1020632/3 |
Text MD5: | 24984efe509d94f017dc40dd461236e9 |
Author: | stefan |
Category: | javax / collections |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2019-04-11 14:40:42 |
Source code size: | 262 bytes / 9 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 337 / 377 |
Version history: | 2 change(s) |
Referenced in: | [show references] |