| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 part of dart.core; | 5 part of dart.core; |
| 6 | 6 |
| 7 /** | 7 /** |
| 8 * The base class for all Dart objects. | 8 * The base class for all Dart objects. |
| 9 * | 9 * |
| 10 * Because Object is the root of the Dart class hierarchy, | 10 * Because Object is the root of the Dart class hierarchy, |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 * * Transitive: For all objects `o1`, `o2`, and `o3`, if `o1 == o2` and | 49 * * Transitive: For all objects `o1`, `o2`, and `o3`, if `o1 == o2` and |
| 50 * `o2 == o3` are true, then `o1 == o3` must be true. | 50 * `o2 == o3` are true, then `o1 == o3` must be true. |
| 51 * | 51 * |
| 52 * The method should also be consistent over time, so equality of two objects | 52 * The method should also be consistent over time, so equality of two objects |
| 53 * should not change over time, or at least only change if one of the objects | 53 * should not change over time, or at least only change if one of the objects |
| 54 * was modified. | 54 * was modified. |
| 55 * | 55 * |
| 56 * If a subclass overrides the equality operator it should override | 56 * If a subclass overrides the equality operator it should override |
| 57 * the [hashCode] method as well to maintain consistency. | 57 * the [hashCode] method as well to maintain consistency. |
| 58 */ | 58 */ |
| 59 bool operator ==(other) => identical(this, other); | 59 external bool operator ==(other); |
| 60 | 60 |
| 61 /** | 61 /** |
| 62 * Get a hash code for this object. | 62 * Get a hash code for this object. |
| 63 * | 63 * |
| 64 * All objects have hash codes. Hash codes are guaranteed to be the | 64 * All objects have hash codes. Hash codes are guaranteed to be the |
| 65 * same for objects that are equal when compared using the equality | 65 * same for objects that are equal when compared using the equality |
| 66 * operator [:==:]. Other than that there are no guarantees about | 66 * operator [:==:]. Other than that there are no guarantees about |
| 67 * the hash codes. They will not be consistent between runs and | 67 * the hash codes. They will not be consistent between runs and |
| 68 * there are no distribution guarantees. | 68 * there are no distribution guarantees. |
| 69 * | 69 * |
| (...skipping 16 matching lines...) Expand all Loading... |
| 86 * | 86 * |
| 87 * The default behavior is to throw a [NoSuchMethodError]. | 87 * The default behavior is to throw a [NoSuchMethodError]. |
| 88 */ | 88 */ |
| 89 external dynamic noSuchMethod(Invocation invocation); | 89 external dynamic noSuchMethod(Invocation invocation); |
| 90 | 90 |
| 91 /** | 91 /** |
| 92 * A representation of the runtime type of the object. | 92 * A representation of the runtime type of the object. |
| 93 */ | 93 */ |
| 94 external Type get runtimeType; | 94 external Type get runtimeType; |
| 95 } | 95 } |
| OLD | NEW |