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

Side by Side Diff: editor/util/plugins/com.google.dart.java2dart/resources/java_engine.dart

Issue 93433007: Implement hashCode for classes with equals(). (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years 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 library java.engine; 1 library java.engine;
2 2
3 class StringUtilities { 3 class StringUtilities {
4 static const String EMPTY = ''; 4 static const String EMPTY = '';
5 static const List<String> EMPTY_ARRAY = const <String> []; 5 static const List<String> EMPTY_ARRAY = const <String> [];
6 static String intern(String s) => s; 6 static String intern(String s) => s;
7 static String substringBefore(String str, String separator) { 7 static String substringBefore(String str, String separator) {
8 if (str == null || str.isEmpty) { 8 if (str == null || str.isEmpty) {
9 return str; 9 return str;
10 } 10 }
(...skipping 19 matching lines...) Expand all
30 } 30 }
31 31
32 class ArrayUtils { 32 class ArrayUtils {
33 static List addAll(List target, List source) { 33 static List addAll(List target, List source) {
34 List result = new List.from(target); 34 List result = new List.from(target);
35 result.addAll(source); 35 result.addAll(source);
36 return result; 36 return result;
37 } 37 }
38 } 38 }
39 39
40 class ObjectUtilities {
41 static int combineHashCodes(int first, int second) => first * 31 + second;
42 }
43
40 class UUID { 44 class UUID {
41 static int __nextId = 0; 45 static int __nextId = 0;
42 final String id; 46 final String id;
43 UUID(this.id); 47 UUID(this.id);
44 String toString() => id; 48 String toString() => id;
45 static UUID randomUUID() => new UUID((__nextId).toString()); 49 static UUID randomUUID() => new UUID((__nextId).toString());
46 } 50 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698