mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
module merge util module naming changed to use "-"
This commit is contained in:
24
utils/utils.android.ts
Normal file
24
utils/utils.android.ts
Normal file
@@ -0,0 +1,24 @@
|
||||
export class Collections {
|
||||
public static stringArrayToStringSet(str: string[]): any {
|
||||
var hashSet = new java.util.HashSet();
|
||||
if ("undefined" != typeof str) {
|
||||
for (var element in str) {
|
||||
hashSet.add('' + str[element]);
|
||||
}
|
||||
}
|
||||
return hashSet;
|
||||
}
|
||||
|
||||
public static stringSetToStringArray(stringSet: any): string[] {
|
||||
var arr = [];
|
||||
if ("undefined" != typeof stringSet) {
|
||||
var it = stringSet.iterator();
|
||||
while (it.hasNext()) {
|
||||
var element = '' + it.next();
|
||||
arr.push(element);
|
||||
}
|
||||
}
|
||||
|
||||
return arr;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user