@ -62,19 +62,19 @@ public class Ordered_hash_base extends Hash_adp_base implements Ordered_hash, Gf
returnthis;
}
privatevoidAssertCounts(Stringproc,Objectkey){
if(super.Count()!=ordered.Count())throwErr_.new_wo_type("counts do not match; same key is either added twice, or delete failed","proc",proc,"key",Object_.Xto_str_strict_or_null_mark(key),"hash",super.Count(),"list",ordered.Count());
if(super.Len()!=ordered.Len())throwErr_.new_wo_type("counts do not match; same key is either added twice, or delete failed","proc",proc,"key",Object_.Xto_str_strict_or_null_mark(key),"hash",super.Len(),"list",ordered.Len());
Bry_fmt_itmkey_itm=(Bry_fmt_itm)keys_hash.Get_by(key);if(key_itm==null)continue;// NOTE: ignore missing keys; EX: fmt=a~{b}c keys=b,d; do not fail b/c ~{d} is not in fmt; allows redefining from tests
Bry_fmt_itmkey_itm=(Bry_fmt_itm)keys_hash.GetByOrNull(key);if(key_itm==null)continue;// NOTE: ignore missing keys; EX: fmt=a~{b}c keys=b,d; do not fail b/c ~{d} is not in fmt; allows redefining from tests
publicObjectGet_by_or_fail(intkey){synchronized(tmp_key){returnhash.Get_by_or_fail(tmp_key.Val_(key));}}// LOCK:used by Xomp_ns_ord_mgr in xomp; DATE:2016-10-18
publicObjectGet_by_or_null(intkey){synchronized(tmp_key){returnhash.Get_by(tmp_key.Val_(key));}}// LOCK:used by Xomp_ns_ord_mgr in xomp; DATE:2016-10-18
publicintLen(){returnhash.Len();}
publicObjectGet_by_or_fail(intkey){synchronized(tmp_key){returnhash.GetByOrFail(tmp_key.Val_(key));}}// LOCK:used by Xomp_ns_ord_mgr in xomp; DATE:2016-10-18
publicObjectGet_by_or_null(intkey){synchronized(tmp_key){returnhash.GetByOrNull(tmp_key.Val_(key));}}// LOCK:used by Xomp_ns_ord_mgr in xomp; DATE:2016-10-18
if(tkns.Count()>subFldsCount)throwErr_.new_wo_type("values.Count cannot be greater than fields.Count","values.Count",tkns.Count(),"fields.Count",subFldsCount);
if(tkns.Len()>subFldsCount)throwErr_.new_wo_type("values.Count cannot be greater than fields.Count","values.Count",tkns.Len(),"fields.Count",subFldsCount);
typeHash.Add_if_dupe_use_1st(regyItm.TypeKey(),regyItm);// NOTE: changed to allow same Object to be added under different aliases (app, xowa) DATE:2014-06-09;
typeHash.AddIfDupeUse1st(regyItm.TypeKey(),regyItm);// NOTE: changed to allow same Object to be added under different aliases (app, xowa) DATE:2014-06-09;
}
publicvoidDel(Stringk){
GfsRegyItmitm=(GfsRegyItm)hash.Get_by(k);
GfsRegyItmitm=(GfsRegyItm)hash.GetByOrNull(k);
if(itm!=null)typeHash.Del(itm.TypeKey());
hash.Del(k);
}
@ -42,7 +42,7 @@ class GfsRegy implements Gfo_invk {
if(String_.Len_eq_0(fld.Name()))throwErr_.new_wo_type("fld name cannot be null");
if(hash.Has(fld.Name()))throwErr_.new_wo_type("key already exists","key",fld.Name());// FIXME: commented out to allow multiple types with same name; need "_type:invk"
if(String_.Len_eq_0(fld.Name()))throwErr_.new_wo_type("fld name cannot be null");
if(hash.Has(fld.Name()))throwErr_.new_wo_type("key already exists","key",fld.Name());// FIXME: commented out to allow multiple types with same name; need "_type:invk"
publicintChainId(){returnchainId;}publicGfmlNdeChainId_(intv){chainId=v;returnthis;}intchainId;// can use boolean chainHead, but this is easier for debugging