| OLD | NEW |
| 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 /** | 5 /** |
| 6 * Accumulates change events from several observable objects. | 6 * Accumulates change events from several observable objects. |
| 7 * | 7 * |
| 8 * wrap() is public and used by client code. The other methods are used by | 8 * wrap() is public and used by client code. The other methods are used by |
| 9 * AbstractObservable, which works with this class to implement batching. | 9 * AbstractObservable, which works with this class to implement batching. |
| 10 */ | 10 */ |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 summary = new EventSummary(obj); | 90 summary = new EventSummary(obj); |
| 91 summaries[uid] = summary; | 91 summaries[uid] = summary; |
| 92 } | 92 } |
| 93 return summary; | 93 return summary; |
| 94 } | 94 } |
| 95 | 95 |
| 96 /** Fires all events at once. */ | 96 /** Fires all events at once. */ |
| 97 void _notify() { | 97 void _notify() { |
| 98 assert(!sealed); | 98 assert(!sealed); |
| 99 sealed = true; | 99 sealed = true; |
| 100 for (final summary in summaries.getValues()) { | 100 for (final summary in summaries.values) { |
| 101 summary.notify(); | 101 summary.notify(); |
| 102 } | 102 } |
| 103 } | 103 } |
| 104 } | 104 } |
| OLD | NEW |