Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(352)

Side by Side Diff: sdk/lib/core/object.dart

Issue 24280003: Add Object.hashCodeOf to get the default hashCode of an object. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Use existing _objectHashCode. Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 * 86 *
87 * The default behavior of [noSuchMethod] is to throw a 87 * The default behavior of [noSuchMethod] is to throw a
88 * [noSuchMethodError]. 88 * [noSuchMethodError].
89 */ 89 */
90 external dynamic noSuchMethod(Invocation invocation); 90 external dynamic noSuchMethod(Invocation invocation);
91 91
92 /** 92 /**
93 * A representation of the runtime type of the object. 93 * A representation of the runtime type of the object.
94 */ 94 */
95 external Type get runtimeType; 95 external Type get runtimeType;
96
97 /**
98 * Returns the same value as [hashCode] on [object] would.
Ivan Posva 2013/09/24 06:22:11 This is not true, as is stated right on the next l
99 *
100 * If [object] hasn't overridden [hashCode] from [Object], this is the
101 * same as `object.hashCode`. This method can be used to get the object's
102 * hashCode event if `hashCode` has been overridden.
Ivan Posva 2013/09/24 06:22:11 What this should state is that this returns the ha
103 */
104 external static int hashCodeOf(Object object);
96 } 105 }
97 106
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698