()
| 62 | SetMultimap<Dict.Prop, String> allWatches = MultimapBuilder.linkedHashKeys().linkedHashSetValues().build(); |
| 63 | |
| 64 | protected boolean update() { |
| 65 | |
| 66 | breadthFirst(both()).forEach((x) -> { |
| 67 | LinkedHashMap<Dict.Prop, Object> previous = x.properties.computeIfAbsent(watchedPrevious, (k) -> new LinkedHashMap<>()); |
| 68 | for (Dict.Prop p : allWatches .keySet()) { |
| 69 | Object was = previous.get(p); |
| 70 | Object now = x.properties.get(p); |
| 71 | |
| 72 | if (!Util.safeEq(was, now)) |
| 73 | { |
| 74 | fire(p, x, was, now, allWatches .get(p)); |
| 75 | // fetch it again, fire can change the value of the property |
| 76 | now = x.properties.get(p); |
| 77 | previous.put(p, now instanceof Mutable ? ((Mutable)now).duplicate() : now); |
| 78 | } |
| 79 | } |
| 80 | }); |
| 81 | return true; |
| 82 | } |
| 83 | |
| 84 | public String addWatch(Dict.Prop property, String address) |
| 85 | { |
nothing calls this directly
no test coverage detected