public static GfoMsg root_leafArgs_(String[] ary, Keyval... kvAry) { int len = Array_.Len(ary); if (len == 0) throw Err_.new_invalid_arg("== 0", "@len", len); GfoMsg root = new GfoMsg_base().ctor_(ary[0], false); GfoMsg owner = root; for (int i = 1; i < len; i++) { String key = ary[i]; GfoMsg cur = new GfoMsg_base().ctor_(key, false); owner.Subs_add(cur); owner = cur; } for (int i = 0; i < kvAry.length; i++) { Keyval kv = kvAry[i]; owner.Add(kv.Key(), kv.Val()); } return root; }
public static GfoMsg basic_(String cmd, Object... vals) { GfoMsg rv = new_cast_(cmd); int len = vals.length; for (int i = 0; i < len; i++) rv.Add("", vals[i]); return rv; }