mirror of
https://github.com/gnosygnu/xowa.git
synced 2026-03-02 03:49:30 +00:00
Xomw: Add XomwSiteList and XomwGenericArrayObject
This commit is contained in:
@@ -17,4 +17,24 @@ package gplx.xowa.mediawiki; import gplx.*; import gplx.xowa.*;
|
||||
public class XophpArray {
|
||||
public static boolean popBoolOrN(List_adp list) {return Bool_.Cast(List_adp_.Pop_or(list, false));}
|
||||
public static byte[] popBryOrNull(List_adp list) {return (byte[])List_adp_.Pop_or(list, null);}
|
||||
public static String[] array_keys_str(Ordered_hash array) {
|
||||
int len = array.Len();
|
||||
String[] rv = new String[len];
|
||||
for (int i = 0; i < len; i++) {
|
||||
rv[i] = (String)array.Get_at(i);
|
||||
}
|
||||
return rv;
|
||||
}
|
||||
public static boolean array_key_exists(int key, Ordered_hash array) {
|
||||
return array.Has(key);
|
||||
}
|
||||
public static boolean array_key_exists(String key, Ordered_hash array) {
|
||||
return array.Has(key);
|
||||
}
|
||||
public static boolean array_is_empty(Ordered_hash array) {
|
||||
return array.Len() == 0;
|
||||
}
|
||||
public static void unset(Ordered_hash array, Object key) {
|
||||
array.Del(key);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user