| OLD | NEW |
| 1 library java.engine; | 1 library java.engine; |
| 2 | 2 |
| 3 import 'java_core.dart'; | 3 import 'java_core.dart'; |
| 4 | 4 |
| 5 /** | 5 /** |
| 6 * A predicate is a one-argument function that returns a boolean value. | 6 * A predicate is a one-argument function that returns a boolean value. |
| 7 */ | 7 */ |
| 8 typedef bool Predicate<E>(E argument); | 8 typedef bool Predicate<E>(E argument); |
| 9 | 9 |
| 10 class StringUtilities { | 10 class StringUtilities { |
| (...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 167 } | 167 } |
| 168 int index = fileName.lastIndexOf('.'); | 168 int index = fileName.lastIndexOf('.'); |
| 169 if (index >= 0) { | 169 if (index >= 0) { |
| 170 return fileName.substring(index + 1); | 170 return fileName.substring(index + 1); |
| 171 } | 171 } |
| 172 return ""; | 172 return ""; |
| 173 } | 173 } |
| 174 } | 174 } |
| 175 | 175 |
| 176 class ArrayUtils { | 176 class ArrayUtils { |
| 177 static List add(List target, Object value) { |
| 178 target = new List.from(target); |
| 179 target.add(value); |
| 180 return target; |
| 181 } |
| 177 static List addAll(List target, List source) { | 182 static List addAll(List target, List source) { |
| 178 List result = new List.from(target); | 183 List result = new List.from(target); |
| 179 result.addAll(source); | 184 result.addAll(source); |
| 180 return result; | 185 return result; |
| 181 } | 186 } |
| 182 } | 187 } |
| 183 | 188 |
| 184 class ObjectUtilities { | 189 class ObjectUtilities { |
| 185 static int combineHashCodes(int first, int second) => first * 31 + second; | 190 static int combineHashCodes(int first, int second) => first * 31 + second; |
| 186 } | 191 } |
| 187 | 192 |
| 188 class UUID { | 193 class UUID { |
| 189 static int __nextId = 0; | 194 static int __nextId = 0; |
| 190 final String id; | 195 final String id; |
| 191 UUID(this.id); | 196 UUID(this.id); |
| 192 String toString() => id; | 197 String toString() => id; |
| 193 static UUID randomUUID() => new UUID((__nextId).toString()); | 198 static UUID randomUUID() => new UUID((__nextId).toString()); |
| 194 } | 199 } |
| OLD | NEW |