| OLD | NEW |
| 1 library java.engine; | 1 library java.engine; |
| 2 | 2 |
| 3 class StringUtilities { | 3 class StringUtilities { |
| 4 static List<String> EMPTY_ARRAY = new List(0); | 4 static List<String> EMPTY_ARRAY = new List(0); |
| 5 static String intern(String s) => s; |
| 5 } | 6 } |
| 6 | 7 |
| 7 class FileNameUtilities { | 8 class FileNameUtilities { |
| 8 static String getExtension(String fileName) { | 9 static String getExtension(String fileName) { |
| 9 if (fileName == null) { | 10 if (fileName == null) { |
| 10 return ""; | 11 return ""; |
| 11 } | 12 } |
| 12 int index = fileName.lastIndexOf('.'); | 13 int index = fileName.lastIndexOf('.'); |
| 13 if (index >= 0) { | 14 if (index >= 0) { |
| 14 return fileName.substring(index + 1); | 15 return fileName.substring(index + 1); |
| 15 } | 16 } |
| 16 return ""; | 17 return ""; |
| 17 } | 18 } |
| 18 } | 19 } |
| 20 |
| 21 class ArrayUtils { |
| 22 static List addAll(List target, List source) { |
| 23 List result = new List.from(target); |
| 24 result.addAll(source); |
| 25 return result; |
| 26 } |
| 27 } |
| 28 |
| 29 class UUID { |
| 30 static int __nextId = 0; |
| 31 final String id; |
| 32 UUID(this.id); |
| 33 String toString() => id; |
| 34 static UUID randomUUID() => new UUID((__nextId).toString()); |
| 35 } |
| OLD | NEW |