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, | 52 * The method should also be consistent over time, |
53 * so whether two objects are equal should only change | 53 * so whether two objects are equal should only change |
54 * if at least one of the objects was modified. | 54 * if at least one of the objects 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 external bool operator==(other); | 59 external bool operator ==(other); |
60 | 60 |
61 /** | 61 /** |
62 * The hash code for this object. | 62 * The hash code for this object. |
63 * | 63 * |
64 * A hash code is a single integer which represents the state of the object | 64 * A hash code is a single integer which represents the state of the object |
65 * that affects [==] comparisons. | 65 * that affects [==] comparisons. |
66 * | 66 * |
67 * All objects have hash codes. | 67 * All objects have hash codes. |
68 * The default hash code represents only the identity of the object, | 68 * The default hash code represents only the identity of the object, |
69 * the same way as the default [==] implementation only considers objects | 69 * the same way as the default [==] implementation only considers objects |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 * | 104 * |
105 * The default behavior is to throw a [NoSuchMethodError]. | 105 * The default behavior is to throw a [NoSuchMethodError]. |
106 */ | 106 */ |
107 external dynamic noSuchMethod(Invocation invocation); | 107 external dynamic noSuchMethod(Invocation invocation); |
108 | 108 |
109 /** | 109 /** |
110 * A representation of the runtime type of the object. | 110 * A representation of the runtime type of the object. |
111 */ | 111 */ |
112 external Type get runtimeType; | 112 external Type get runtimeType; |
113 } | 113 } |
OLD | NEW |