public boolean ReadYn_toggle(String k, boolean cur) { Object rv = ReadOr(k, "!"); if (rv == Nil) ThrowNotFound(k); if (!parse) throw Err_.new_wo_type("only parse supported"); String rv_str = (String) rv; return (String_.Eq(rv_str, "!")) ? !cur : Yn.parse(rv_str); }
public String To_str(Object o) { if (o == null) return "<<NULL>>"; Class<?> type = Type_adp_.ClassOf_obj(o); String rv = null; if (type == String.class) rv = String_.cast(o); else if (Int_.TypeMatch(type)) return Int_.To_str(Int_.cast(o)); else if (Type_adp_.Eq(type, Bool_.Cls_ref_type)) return Yn.To_str(Bool_.cast(o)); else if (type == DateAdp.class) return DateAdp_.cast(o).XtoStr_gplx(); else rv = Object_.Xto_str_strict_or_empty(o); return String_.Replace(rv, "'", "''"); }
public boolean ReadYn(String k) { Object rv = ReadOr(k, false); if (rv == Nil) ThrowNotFound(k); return parse ? Yn.parse_or((String) rv, false) : Yn.coerce_(rv); }
public boolean ReadYnOrY(String k) { Object rv = ReadOr(k, true); if (rv == Nil) return true; return parse ? Yn.parse_or((String) rv, true) : Bool_.cast(rv); }
public boolean ReadBoolOrFalse(String k) { Object rv = ReadOr(k, false); if (rv == Nil) return false; return parse ? Yn.parse_or((String) rv, false) : Bool_.cast(rv); }
public boolean ReadBoolOr(String k, boolean or) { Object rv = ReadOr(k, or); if (rv == Nil) return or; return parse ? Yn.parse_or((String) rv, or) : Bool_.cast(rv); }
public boolean ReadBool(String k) { Object rv = ReadOr(k, false); if (rv == Nil) ThrowNotFound(k); return parse ? Yn.parse_or((String) rv, false) : Bool_.cast(rv); }