1
0
mirror of https://github.com/gnosygnu/xowa.git synced 2024-10-27 20:34:16 +00:00

Refactor: Remove whitespace after final and remove @gplx.Virtual

This commit is contained in:
gnosygnu 2021-11-28 08:45:40 -05:00
parent b0082fd231
commit 231e10bc19
2362 changed files with 43007 additions and 42938 deletions

View File

@ -16,15 +16,15 @@ Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
package gplx;
public class Bool_ {//RF:2017-10-08
public static final String Cls_val_name = "bool";
public static final Class<?> Cls_ref_type = Boolean.class;
public static final Class<?> Cls_ref_type = Boolean.class;
public static final boolean N = false , Y = true;
public static final byte N_byte = 0 , Y_byte = 1 , __byte = 127;
public static final int N_int = 0 , Y_int = 1 , __int = -1;
public static final byte[] N_bry = new byte[] {Byte_ascii.Ltr_n}, Y_bry = new byte[] {Byte_ascii.Ltr_y};
public static final byte[] N_bry = new byte[] {Byte_ascii.Ltr_n}, Y_bry = new byte[] {Byte_ascii.Ltr_y};
public static final String True_str = "true", False_str = "false";
public static final byte[] True_bry = Bry_.new_a7(True_str), False_bry = Bry_.new_a7(False_str);
public static final byte[] True_bry = Bry_.new_a7(True_str), False_bry = Bry_.new_a7(False_str);
public static boolean By_int(int v) {return v == Y_int;}
public static int To_int(boolean v) {return v ? Y_int : N_int;}

View File

@ -438,7 +438,7 @@ public class Bry_ {
}
return rv;
}
public static final byte[] Trim_ary_ws = mask_(256, Byte_ascii.Tab, Byte_ascii.Nl, Byte_ascii.Cr, Byte_ascii.Space);
public static final byte[] Trim_ary_ws = mask_(256, Byte_ascii.Tab, Byte_ascii.Nl, Byte_ascii.Cr, Byte_ascii.Space);
public static byte[] Trim(byte[] src) {return Trim(src, 0, src.length, true, true, Trim_ary_ws, true);}
public static byte[] Trim(byte[] src, int bgn, int end) {return Trim(src, bgn, end, true, true, Trim_ary_ws, true);}
public static byte[] Trim(byte[] src, int bgn, int end, boolean trim_bgn, boolean trim_end, byte[] trim_ary, boolean reuse_bry_if_noop) {
@ -826,8 +826,8 @@ public class Bry_ {
if (!Bry_.Eq(lhs[i], rhs[i])) return false;
return true;
}
public static final byte Dlm_fld = (byte)'|', Dlm_row = (byte)'\n', Dlm_quote = (byte)'"', Dlm_null = 0, Ascii_zero = 48;
public static final String Fmt_csvDte = "yyyyMMdd HHmmss.fff";
public static final byte Dlm_fld = (byte)'|', Dlm_row = (byte)'\n', Dlm_quote = (byte)'"', Dlm_null = 0, Ascii_zero = 48;
public static final String Fmt_csvDte = "yyyyMMdd HHmmss.fff";
public static DateAdp ReadCsvDte(byte[] ary, Int_obj_ref posRef, byte lkp) {// ASSUME: fmt = yyyyMMdd HHmmss.fff
int y = 0, M = 0, d = 0, H = 0, m = 0, s = 0, f = 0;
int bgn = posRef.Val();

View File

@ -558,7 +558,7 @@ public class Bry_bfr {
this.Del_by(count);
return this;
}
private static final boolean[] Trim_end_ws_ary = Trim_end_ws_new();
private static final boolean[] Trim_end_ws_ary = Trim_end_ws_new();
private static boolean[] Trim_end_ws_new() {
boolean[] rv = new boolean[256];
rv[32] = true;

View File

@ -20,7 +20,7 @@ public class Bry_bfr_ {
public static Bry_bfr New_w_size(int v) {return new Bry_bfr(v);}
public static Bry_bfr Reset(int v) {return new Bry_bfr(16).Reset_(v);} // PERF: set initial size to 16, not reset val; allows for faster "startup"; DATE:2014-06-14
public static final Bry_bfr[] Ary_empty = new Bry_bfr[0];
public static final Bry_bfr[] Ary_empty = new Bry_bfr[0];
private static Bry_bfr_mkr_mgr dflt;
public static Bry_bfr Get() {if (dflt == null) dflt = new Bry_bfr_mkr_mgr(Bry_bfr_mkr.Tid_b128, 128); return dflt.Get();} // NOTE: lazy else "Object synchronization" error; DATE:2015-11-18
public static void Assert_at_end(Bry_bfr bfr, byte assert_byte) {

View File

@ -235,7 +235,7 @@ public class Bry_bfr_tst {
}
}
class ByteAryBfr_fxt {
private final Bry_bfr bfr = Bry_bfr_.Reset(16);
private final Bry_bfr bfr = Bry_bfr_.Reset(16);
public Bry_bfr Bfr() {return bfr;}
public void Clear() {
bfr.ClearAndReset();

View File

@ -15,7 +15,7 @@ Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
*/
package gplx;
public class Bry_find_ {
public static final int Not_found = -1;
public static final int Not_found = -1;
public static int Find_fwd(byte[] src, byte lkp) {return Find_fwd(src, lkp, 0, src.length);}
public static int Find_fwd(byte[] src, byte lkp, int cur) {return Find_fwd(src, lkp, cur, src.length);}
public static int Find_fwd(byte[] src, byte lkp, int cur, int end) {

View File

@ -16,7 +16,7 @@ Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
package gplx;
import gplx.core.brys.*; import gplx.core.brys.fmts.*;
public class Bry_fmt {
private final Object thread_lock = new Object();
private final Object thread_lock = new Object();
private byte[] src;
private Bry_fmt_itm[] itms; private int itms_len;
private Bfr_fmt_arg[] args = Bfr_fmt_arg.Ary_empty;

View File

@ -16,7 +16,7 @@ Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
package gplx;
import gplx.core.brys.*;
public class Bry_split_ {
private static final Object thread_lock = new Object();
private static final Object thread_lock = new Object();
public static byte[][] Split(byte[] src, byte dlm) {return Split(src, dlm, false);}
public static byte[][] Split(byte[] src, byte dlm, boolean trim) {return src == null ? Bry_.Ary_empty : Split(src, 0, src.length, dlm, trim);}
public static byte[][] Split(byte[] src, int bgn, int end, byte dlm, boolean trim) {
@ -156,7 +156,7 @@ public class Bry_split_ {
public static final int Rv__ok = 0, Rv__extend = 1, Rv__cancel = 2;
}
class Bry_split_wkr__to_ary implements gplx.core.brys.Bry_split_wkr {
private final List_adp list = List_adp_.New();
private final List_adp list = List_adp_.New();
public int Split(byte[] src, int itm_bgn, int itm_end) {
synchronized (list) {
byte[] bry = itm_end == itm_bgn ? Bry_.Empty : Bry_.Mid(src, itm_bgn, itm_end);
@ -169,5 +169,5 @@ class Bry_split_wkr__to_ary implements gplx.core.brys.Bry_split_wkr {
return (byte[][])list.To_ary_and_clear(byte[].class);
}
}
public static final Bry_split_wkr__to_ary Instance = new Bry_split_wkr__to_ary(); Bry_split_wkr__to_ary() {}
public static final Bry_split_wkr__to_ary Instance = new Bry_split_wkr__to_ary(); Bry_split_wkr__to_ary() {}
}

View File

@ -16,7 +16,7 @@ Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
package gplx;
import org.junit.*; import gplx.core.tests.*;
public class Bry_split__tst {
private final Bry_split__fxt fxt = new Bry_split__fxt();
private final Bry_split__fxt fxt = new Bry_split__fxt();
@Test public void Split() {
fxt.Test_split("a" , Byte_ascii.Pipe, Bool_.N, "a"); // no trim
fxt.Test_split("a|" , Byte_ascii.Pipe, Bool_.N, "a");
@ -56,7 +56,7 @@ public class Bry_split__tst {
}
}
class Bry_split__fxt {
private final Bry_split_wkr__example wkr = new Bry_split_wkr__example();
private final Bry_split_wkr__example wkr = new Bry_split_wkr__example();
public void Test_split(String raw_str, byte dlm, boolean trim, String... expd) {
byte[] src = Bry_.new_a7(raw_str);
Bry_split_.Split(src, 0, src.length, dlm, trim, wkr);
@ -75,7 +75,7 @@ class Bry_split__fxt {
}
}
class Bry_split_wkr__example implements gplx.core.brys.Bry_split_wkr {
private final List_adp list = List_adp_.New();
private final List_adp list = List_adp_.New();
public int Split(byte[] src, int itm_bgn, int itm_end) {
byte[] bry = itm_end == itm_bgn ? Bry_.Empty : Bry_.Mid(src, itm_bgn, itm_end);
if (Bry_.Eq(bry, Bry_.new_a7("extend"))) return Bry_split_.Rv__extend;

View File

@ -16,7 +16,7 @@ Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
package gplx;
public class Byte_ {//RF:2017-10-08
public static final String Cls_val_name = "byte";
public static final Class<?> Cls_ref_type = Byte.class;
public static final Class<?> Cls_ref_type = Byte.class;
public static final byte
Zero = 0

View File

@ -95,8 +95,8 @@ public class Byte_ascii {
? (byte)(b + 32)
: b;
}
public static final byte[] Space_len2 = new byte[] {Space, Space}, Space_len4 = new byte[] {Space, Space, Space, Space};
public static final byte[]
public static final byte[] Space_len2 = new byte[] {Space, Space}, Space_len4 = new byte[] {Space, Space, Space, Space};
public static final byte[]
Tab_bry = new byte[] {Byte_ascii.Tab}
, Nl_bry = new byte[] {Byte_ascii.Nl}
, Space_bry = new byte[] {Byte_ascii.Space}

View File

@ -16,7 +16,7 @@ Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
package gplx;
public class Char_ {
public static final String Cls_val_name = "char";
public static final Class<?> Cls_ref_type = Character.class;
public static final Class<?> Cls_ref_type = Character.class;
public static final char Null = '\0', NewLine = '\n';
public static boolean IsCaseLower(char c) {return Character.isLowerCase(c);}
public static boolean IsLetterOrDigit(char c) {return Character.isLetterOrDigit(c);}

View File

@ -29,7 +29,7 @@ public class DateAdp implements CompareAble, Gfo_invk {
return this.Add_day(days);
}
else return Gfo_invk_.Rv_unhandled;
} public static final String Invk_XtoStr_fmt = "XtoStr_fmt", Invk_AddDays = "Add_day";
} public static final String Invk_XtoStr_fmt = "XtoStr_fmt", Invk_AddDays = "Add_day";
public int Segment(int segmentIdx) {
switch (segmentIdx) {
case DateAdp_.SegIdx_year: return this.Year();

View File

@ -25,13 +25,13 @@ import java.util.Locale;
import java.util.TimeZone;
public class DateAdp_ implements Gfo_invk {
public static final String Cls_ref_name = "Date";
public static final Class<?> Cls_ref_type = DateAdp.class;
public static final Class<?> Cls_ref_type = DateAdp.class;
public Object Invk(GfsCtx ctx, int ikey, String k, GfoMsg m) {
if (ctx.Match(k, Invk_Now)) return Datetime_now.Get();
else return Gfo_invk_.Rv_unhandled;
} public static final String Invk_Now = "Now";
public static final DateAdp MinValue = new DateAdp( 1, 1, 1, 0, 0, 0, 0);
public static final DateAdp MaxValue = new DateAdp(9999, 12, 31, 23, 59, 59, 999);
} public static final String Invk_Now = "Now";
public static final DateAdp MinValue = new DateAdp( 1, 1, 1, 0, 0, 0, 0);
public static final DateAdp MaxValue = new DateAdp(9999, 12, 31, 23, 59, 59, 999);
// public static DateAdp Now() {return Tfds.Now_enabled() ? Tfds.Now() : new DateAdp(new GregorianCalendar());}
public static DateAdp new_(int year, int month, int day, int hour, int minute, int second, int frac) {return new DateAdp(year, month, day, hour, minute, second, frac);}
public static DateAdp seg_(int[] ary) {
@ -64,7 +64,7 @@ public class DateAdp_ implements Gfo_invk {
} static DateAdp_parser date_parser = DateAdp_parser.new_();
public static DateAdp dateTime_(GregorianCalendar v) {return new DateAdp(v);}
public static DateAdp dateTime_obj_(Object v) {return new DateAdp((GregorianCalendar)v);}
public static final DateAdp_ Gfs = new DateAdp_();
public static final DateAdp_ Gfs = new DateAdp_();
public static int DaysInMonth(DateAdp date) {return DaysInMonth(date.Month(), date.Year());}
public static int DaysInMonth(int month, int year) {

View File

@ -16,7 +16,7 @@ Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
package gplx;
import org.junit.*; import gplx.core.tests.*;
public class DateAdp__tst {
private final DateAdp__fxt fxt = new DateAdp__fxt();
private final DateAdp__fxt fxt = new DateAdp__fxt();
@Test public void Parse_gplx() {
fxt.Test__parse_gplx("99991231_235959.999" , "99991231_235959.999");
fxt.Test__parse_gplx("20090430_213200.123" , "20090430_213200.123");

View File

@ -16,7 +16,7 @@ Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
package gplx;
import java.util.GregorianCalendar;
public class Datetime_now {
private static final DateAdp dflt = DateAdp_.parse_gplx("2001-01-01 00:00:00.000");
private static final DateAdp dflt = DateAdp_.parse_gplx("2001-01-01 00:00:00.000");
private static DateAdp manual;
private static boolean autoincrement = true;
public static void Manual_y_() {
@ -49,7 +49,7 @@ public class Datetime_now {
public static DateAdp Get_force() { // ignore manual and force get of real time
return new DateAdp(new GregorianCalendar());
}
// private static final DateAdp manual_time_dflt = DateAdp_.parse_gplx("2001-01-01 00:00:00.000");
// private static final DateAdp manual_time_dflt = DateAdp_.parse_gplx("2001-01-01 00:00:00.000");
// private static DateAdp manual_time;
// static boolean Now_enabled() {return now_enabled;} private static boolean now_enabled;
// static void Now_enabled_y_() {now_enabled = Bool_.Y; manual_time = manual_time_dflt;}

View File

@ -25,13 +25,13 @@ import java.util.Locale;
public class Decimal_adp_ {
public static final String Cls_val_name = "decimal";
public static final Class<?> Cls_ref_type = Decimal_adp.class;
public static final Class<?> Cls_ref_type = Decimal_adp.class;
public static Decimal_adp as_(Object obj) {return obj instanceof Decimal_adp ? (Decimal_adp)obj : null;}
public static final Decimal_adp Zero = new Decimal_adp(0);
public static final Decimal_adp One = new Decimal_adp(1);
public static final Decimal_adp Neg1 = new Decimal_adp(-1);
public static final Decimal_adp Const_e = Decimal_adp_.double_(Math_.E);
public static final Decimal_adp Const_pi = Decimal_adp_.double_(Math_.Pi);
public static final Decimal_adp Zero = new Decimal_adp(0);
public static final Decimal_adp One = new Decimal_adp(1);
public static final Decimal_adp Neg1 = new Decimal_adp(-1);
public static final Decimal_adp Const_e = Decimal_adp_.double_(Math_.E);
public static final Decimal_adp Const_pi = Decimal_adp_.double_(Math_.Pi);
public static Decimal_adp base1000_(long v) {return divide_(v, 1000);}
public static Decimal_adp parts_1000_(long num, int frc) {return divide_((num * (1000)) + frc, 1000);}
public static Decimal_adp parts_(long num, int frc) {

View File

@ -17,13 +17,13 @@ package gplx;
public class Double_ {
public static final String Cls_val_name = "double";
public static final Class<?> Cls_ref_type = Double.class;
public static final Class<?> Cls_ref_type = Double.class;
public static final double
MinValue = Double.MIN_VALUE
, NaN = Double.NaN
, Inf_pos = Double.POSITIVE_INFINITY
;
public static final byte[]
public static final byte[]
NaN_bry = Bry_.new_a7("NaN")
, Inf_pos_bry = Bry_.new_a7("INF")
;

View File

@ -16,8 +16,8 @@ Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
package gplx;
import gplx.core.errs.*;
public class Err extends RuntimeException {
private final boolean is_gplx;
private final String trace;
private final boolean is_gplx;
private final String trace;
private Err_msg[] msgs_ary = new Err_msg[8]; private int msgs_len = 8, msgs_idx = 0;
public Err(boolean is_gplx, String trace, String type, String msg, Object... args) {

View File

@ -74,5 +74,5 @@ public class Err_ {
public static Err Cast_or_null(Exception e) {return Type_.Eq_by_obj(e, Err.class) ? (Err)e : null;}
public static Err Cast_or_make(Throwable e) {return Type_.Eq_by_obj(e, Err.class) ? (Err)e : new Err(Bool_.N, Err_.Trace_lang(e), Type_.Name_by_obj(e), Err_.Message_lang(e));}
public static final String Type__op_canceled = "gplx.op_canceled";
public static final String Type__op_canceled = "gplx.op_canceled";
}

View File

@ -17,7 +17,7 @@ package gplx;
import gplx.core.primitives.*; import gplx.core.strings.*; import gplx.core.brys.*; import gplx.core.interfaces.*;
public class GfoMsg_ {
public static GfoMsg as_(Object obj) {return obj instanceof GfoMsg ? (GfoMsg)obj : null;}
public static final GfoMsg Null = new GfoMsg_base().ctor_("<<NULL MSG>>", false);
public static final GfoMsg Null = new GfoMsg_base().ctor_("<<NULL MSG>>", false);
public static GfoMsg new_parse_(String key) {return new GfoMsg_base().ctor_(key, true);}
public static GfoMsg new_cast_(String key) {return new GfoMsg_base().ctor_(key, false);}
public static GfoMsg srl_(GfoMsg owner, String key) {
@ -181,7 +181,7 @@ class GfoMsg_base implements GfoMsg {
public byte[][] ReadBryAry(String k, byte spr) {return Bry_split_.Split(ReadBry(k), spr);}
public String[] ReadStrAryIgnore(String k, String spr, String ignore) {return String_.Split(String_.Replace(ReadStr(k), ignore, ""), spr);}
public Object ReadValAt(int i) {return Args_getAt(i).Val();}
@gplx.Virtual protected Object ReadOr(String k, Object defaultOr) {
protected Object ReadOr(String k, Object defaultOr) {
if (args == null) return Nil; // WORKAROUND.gfui: args null for DataBndr_whenEvt_execCmd
if (!String_.Eq(k, "")) {
for (int i = 0; i < args.Count(); i++) {
@ -258,7 +258,7 @@ class GfoMsg_base implements GfoMsg {
public GfoMsg_base ctor_(String key, boolean parse) {this.key = key; this.parse = parse; return this;} private boolean parse;
@gplx.Internal protected GfoMsg_base(){}
static final String_obj_val Nil = String_obj_val.new_("<<NOT FOUND>>");
static final String_obj_val Nil = String_obj_val.new_("<<NOT FOUND>>");
}
interface XtoStrWkr {
String To_str(Object o);

View File

@ -44,6 +44,6 @@ public class GfoMsg_tst {
if (ctx.Deny()) return this;
}
return this;
} public static final String Invk_Cmd0 = "Cmd0";
} public static final String Invk_Cmd0 = "Cmd0";
}
}

View File

@ -25,6 +25,6 @@ public class GfoTemplateFactory implements Gfo_invk {
Object o = hash.Get_by(k);
return o == null ? Gfo_invk_.Rv_unhandled : o;
}
public static final GfoTemplateFactory Instance = new GfoTemplateFactory(); GfoTemplateFactory() {}
public static final GfoTemplateFactory Instance = new GfoTemplateFactory(); GfoTemplateFactory() {}
Hash_adp hash = Hash_adp_.New();
}

View File

@ -16,7 +16,7 @@ Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
package gplx;
import gplx.core.lists.*;
public class Gfo_evt_mgr {
private final Gfo_evt_mgr_owner sender; private Ordered_hash subsRegy, pubsRegy;
private final Gfo_evt_mgr_owner sender; private Ordered_hash subsRegy, pubsRegy;
public Gfo_evt_mgr(Gfo_evt_mgr_owner sender) {this.sender = sender;}
@gplx.Internal protected void AddSub(Gfo_evt_mgr_owner pub, String pubEvt, Gfo_evt_itm sub, String subPrc) {
GfoEvLnk lnk = new GfoEvLnk(pub, pubEvt, sub, subPrc);

View File

@ -17,8 +17,8 @@ package gplx;
import gplx.core.primitives.*;
public class Gfo_invk_ {
public static final String Mutator_suffix = "_";
public static final Gfo_invk Noop = new Gfo_invk__noop();
public static final String_obj_val
public static final Gfo_invk Noop = new Gfo_invk__noop();
public static final String_obj_val
Rv_unhandled = String_obj_val.new_("Unhandled")
, Rv_handled = String_obj_val.new_("Handled")
, Rv_host = String_obj_val.new_("Host")

View File

@ -15,14 +15,14 @@ Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
*/
package gplx;
public class Gfo_invk_cmd {
private final Gfo_invk itm; private final String cmd; private final GfoMsg msg;
private final Gfo_invk itm; private final String cmd; private final GfoMsg msg;
public Gfo_invk_cmd(Gfo_invk itm, String cmd, GfoMsg msg) {
this.itm = itm; this.cmd = cmd; this.msg = msg;
}
public Object Exec() {return itm.Invk(GfsCtx.Instance, 0, cmd, msg);}
public Object Exec_by_ctx(GfsCtx ctx, GfoMsg msg) {return itm.Invk(ctx, 0, cmd, msg);}
public static final Gfo_invk_cmd Noop = new Gfo_invk_cmd(Gfo_invk_.Noop, "", GfoMsg_.Null);
public static final Gfo_invk_cmd Noop = new Gfo_invk_cmd(Gfo_invk_.Noop, "", GfoMsg_.Null);
public static Gfo_invk_cmd New_by_key(Gfo_invk itm, String cmd) {return New_by_val(itm, cmd, null);}
public static Gfo_invk_cmd New_by_val(Gfo_invk itm, String cmd, Object val) {
return new Gfo_invk_cmd(itm, cmd, (val == null) ? GfoMsg_.Null : GfoMsg_.new_parse_(cmd).Add("v", val));

View File

@ -49,7 +49,7 @@ public class Gfo_invk_cmd_mgr {
}
return Unhandled;
}
public static final String_obj_val Unhandled = String_obj_val.new_("Gfo_invk_cmd_mgr Unhandled");
public static final String_obj_val Unhandled = String_obj_val.new_("Gfo_invk_cmd_mgr Unhandled");
List_adp list = List_adp_.New();
public static Gfo_invk_cmd_mgr new_() {return new Gfo_invk_cmd_mgr();} Gfo_invk_cmd_mgr() {}
}

View File

@ -17,7 +17,7 @@ package gplx;
public class Gfo_usr_dlg_ {
private static Gfo_usr_dlg_base test__list, test__show;
public static Gfo_usr_dlg Instance = Gfo_usr_dlg_noop.Instance; // NOTE: global instance which can be reassigned
public static final Gfo_usr_dlg Noop = Gfo_usr_dlg_noop.Instance;
public static final Gfo_usr_dlg Noop = Gfo_usr_dlg_noop.Instance;
public static Gfo_usr_dlg__gui Test__list__init() {
if (test__list == null)
test__list = new Gfo_usr_dlg_base(Gfo_usr_dlg__log_.Noop, Gfo_usr_dlg__gui_.Test);
@ -68,5 +68,5 @@ class Gfo_usr_dlg_noop implements Gfo_usr_dlg {
public String Log_direct(String msg) {return "";}
public String Plog_many(String grp_key, String msg_key, String fmt, Object... args) {return "";}
public Object Invk(GfsCtx ctx, int ikey, String k, GfoMsg m) {return this;}
public static final Gfo_usr_dlg_noop Instance = new Gfo_usr_dlg_noop(); Gfo_usr_dlg_noop() {}
public static final Gfo_usr_dlg_noop Instance = new Gfo_usr_dlg_noop(); Gfo_usr_dlg_noop() {}
}

View File

@ -16,10 +16,10 @@ Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
package gplx;
import gplx.core.consoles.*; import gplx.core.lists.rings.*;
public class Gfo_usr_dlg__gui_ {
public static final Gfo_usr_dlg__gui Noop = new Gfo_usr_dlg__gui_noop();
public static final Gfo_usr_dlg__gui Console = new Gfo_usr_dlg__gui_console();
public static final Gfo_usr_dlg__gui Test = new Gfo_usr_dlg__gui_mock();
public static final Gfo_usr_dlg__gui Mem = new Gfo_usr_dlg__gui_mem_string();
public static final Gfo_usr_dlg__gui Noop = new Gfo_usr_dlg__gui_noop();
public static final Gfo_usr_dlg__gui Console = new Gfo_usr_dlg__gui_console();
public static final Gfo_usr_dlg__gui Test = new Gfo_usr_dlg__gui_mock();
public static final Gfo_usr_dlg__gui Mem = new Gfo_usr_dlg__gui_mem_string();
public static String Mem_file() {return ((Gfo_usr_dlg__gui_mem_string)Mem).file;}
}
class Gfo_usr_dlg__gui_noop implements Gfo_usr_dlg__gui {
@ -31,9 +31,9 @@ class Gfo_usr_dlg__gui_noop implements Gfo_usr_dlg__gui {
public void Write_stop(String text) {}
}
class Gfo_usr_dlg__gui_console implements Gfo_usr_dlg__gui {
private final Console_adp__sys console = Console_adp__sys.Instance;
private final Console_adp__sys console = Console_adp__sys.Instance;
public void Clear() {}
public Ring__string Prog_msgs() {return ring;} private final Ring__string ring = new Ring__string().Max_(0);
public Ring__string Prog_msgs() {return ring;} private final Ring__string ring = new Ring__string().Max_(0);
public void Write_prog(String text) {console.Write_tmp(text);}
public void Write_note(String text) {console.Write_str_w_nl(text);}
public void Write_warn(String text) {console.Write_str_w_nl(text);}
@ -42,7 +42,7 @@ class Gfo_usr_dlg__gui_console implements Gfo_usr_dlg__gui {
class Gfo_usr_dlg__gui_mem_string implements Gfo_usr_dlg__gui {
public String file = "";
public void Clear() {file = "";}
public Ring__string Prog_msgs() {return ring;} private final Ring__string ring = new Ring__string().Max_(0);
public Ring__string Prog_msgs() {return ring;} private final Ring__string ring = new Ring__string().Max_(0);
public void Write_prog(String text) {file += text + "\n";}
public void Write_note(String text) {file += text + "\n";}
public void Write_warn(String text) {file += text + "\n";}

View File

@ -16,9 +16,9 @@ Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
package gplx;
import gplx.core.lists.rings.*;
public class Gfo_usr_dlg__gui_mock implements Gfo_usr_dlg__gui {
public List_adp Warns() {return warns;} private final List_adp warns = List_adp_.New();
public List_adp Msgs() {return msgs;} private final List_adp msgs = List_adp_.New();
public Ring__string Prog_msgs() {return ring;} private final Ring__string ring = new Ring__string().Max_(0);
public List_adp Warns() {return warns;} private final List_adp warns = List_adp_.New();
public List_adp Msgs() {return msgs;} private final List_adp msgs = List_adp_.New();
public Ring__string Prog_msgs() {return ring;} private final Ring__string ring = new Ring__string().Max_(0);
public void Clear() {msgs.Clear(); warns.Clear();}
public void Write_prog(String text) {msgs.Add(text);}
public void Write_note(String text) {msgs.Add(text);}

View File

@ -16,12 +16,12 @@ Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
package gplx;
import gplx.core.strings.*; import gplx.core.consoles.*; import gplx.core.brys.fmtrs.*;
public class Gfo_usr_dlg__log_base implements Gfo_usr_dlg__log {
private final Object thread_lock = new Object();
private final Object thread_lock = new Object();
private int archive_dirs_max = 8;
private Io_url log_dir, err_fil;
private final Ordered_hash queued_list = Ordered_hash_.New();
private final Bry_fmtr fmtr = Bry_fmtr.New__tmp();
private final Bry_bfr tmp_bfr = Bry_bfr_.Reset(255);
private final Ordered_hash queued_list = Ordered_hash_.New();
private final Bry_fmtr fmtr = Bry_fmtr.New__tmp();
private final Bry_bfr tmp_bfr = Bry_bfr_.Reset(255);
public boolean Queue_enabled() {return queue_enabled;} public void Queue_enabled_(boolean v) {queue_enabled = v; if (!v) this.Flush();} private boolean queue_enabled;
public boolean Enabled() {return enabled;} public void Enabled_(boolean v) {enabled = v;} private boolean enabled = true;
public Io_url Session_dir() {return session_dir;} private Io_url session_dir;
@ -115,10 +115,10 @@ public class Gfo_usr_dlg__log_base implements Gfo_usr_dlg__log {
else return Gfo_invk_.Rv_unhandled;
return this;
}
public static final Gfo_usr_dlg__log_base Instance = new Gfo_usr_dlg__log_base();
public static final Gfo_usr_dlg__log_base Instance = new Gfo_usr_dlg__log_base();
}
class Usr_log_fil {
private final String_bldr sb = String_bldr_.new_();
private final String_bldr sb = String_bldr_.new_();
public Usr_log_fil(Io_url url) {
this.url = url;
}

View File

@ -16,8 +16,8 @@ Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
package gplx;
import gplx.core.brys.fmtrs.*;
public class Gfo_usr_dlg_base implements Gfo_usr_dlg {
private final Bry_bfr tmp_bfr = Bry_bfr_.Reset(255);
private final Bry_fmtr tmp_fmtr = Bry_fmtr.New__tmp().Fail_when_invalid_escapes_(false); // do not fail b/c msgs may contain excerpt of random text; EX:[[User:A|~A~]] DATE:2014-11-28
private final Bry_bfr tmp_bfr = Bry_bfr_.Reset(255);
private final Bry_fmtr tmp_fmtr = Bry_fmtr.New__tmp().Fail_when_invalid_escapes_(false); // do not fail b/c msgs may contain excerpt of random text; EX:[[User:A|~A~]] DATE:2014-11-28
public Gfo_usr_dlg_base(Gfo_usr_dlg__log log_wkr, Gfo_usr_dlg__gui gui_wkr) {this.log_wkr = log_wkr; this.gui_wkr = gui_wkr;}
public Gfo_usr_dlg__log Log_wkr() {return log_wkr;} public void Log_wkr_(Gfo_usr_dlg__log v) {log_wkr = v;} private Gfo_usr_dlg__log log_wkr;
public Gfo_usr_dlg__gui Gui_wkr() {return gui_wkr;} public void Gui_wkr_(Gfo_usr_dlg__gui v) {gui_wkr = v;} private Gfo_usr_dlg__gui gui_wkr;

View File

@ -16,7 +16,7 @@ Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
package gplx;
public class Guid_adp_ {
public static final String Cls_ref_name = "Guid";
public static final Guid_adp Empty = Parse("00000000-0000-0000-0000-000000000000");
public static final Guid_adp Empty = Parse("00000000-0000-0000-0000-000000000000");
public static String New_str() {return New().To_str();}
public static Guid_adp New() {return new Guid_adp(java.util.UUID.randomUUID());}
public static Guid_adp Parse(String s) {return new Guid_adp(java.util.UUID.fromString(s));}

View File

@ -17,7 +17,7 @@ package gplx;
import gplx.core.primitives.*;
public class Hash_adp_ {
public static Hash_adp New() {return new Hash_adp_obj();}
public static final Hash_adp Noop = new Hash_adp_noop();
public static final Hash_adp Noop = new Hash_adp_noop();
}
class Hash_adp_obj extends gplx.core.lists.Hash_adp_base implements Hash_adp {}//_20110428
class Hash_adp_noop implements Hash_adp {

View File

@ -17,7 +17,7 @@ package gplx;
import gplx.core.primitives.*;
import gplx.core.intls.*;
public class Hash_adp_bry extends gplx.core.lists.Hash_adp_base implements Hash_adp {
private final Hash_adp_bry_itm_base proto, key_ref;
private final Hash_adp_bry_itm_base proto, key_ref;
Hash_adp_bry(Hash_adp_bry_itm_base proto) {
this.proto = proto;
this.key_ref = proto.New();
@ -106,7 +106,7 @@ class Hash_adp_bry_itm_cs extends Hash_adp_bry_itm_base {
}
return true;
}
public static final Hash_adp_bry_itm_cs Instance = new Hash_adp_bry_itm_cs(); Hash_adp_bry_itm_cs() {}
public static final Hash_adp_bry_itm_cs Instance = new Hash_adp_bry_itm_cs(); Hash_adp_bry_itm_cs() {}
}
class Hash_adp_bry_itm_ci_a7 extends Hash_adp_bry_itm_base {
private byte[] src; int src_bgn, src_end;
@ -139,10 +139,10 @@ class Hash_adp_bry_itm_ci_a7 extends Hash_adp_bry_itm_base {
}
return true;
}
public static final Hash_adp_bry_itm_ci_a7 Instance = new Hash_adp_bry_itm_ci_a7(); Hash_adp_bry_itm_ci_a7() {}
public static final Hash_adp_bry_itm_ci_a7 Instance = new Hash_adp_bry_itm_ci_a7(); Hash_adp_bry_itm_ci_a7() {}
}
class Hash_adp_bry_itm_ci_u8 extends Hash_adp_bry_itm_base {
private final Gfo_case_mgr case_mgr;
private final Gfo_case_mgr case_mgr;
Hash_adp_bry_itm_ci_u8(Gfo_case_mgr case_mgr) {this.case_mgr = case_mgr;}
private byte[] src; int src_bgn, src_end;
@Override public Hash_adp_bry_itm_base New() {return new Hash_adp_bry_itm_ci_u8(case_mgr);}

View File

@ -18,7 +18,7 @@ import gplx.core.strings.*; import gplx.langs.gfs.*;
public class Int_ {
// -------- BASELIB_COPY --------
public static final String Cls_val_name = "int";
public static final Class<?> Cls_ref_type = Integer.class;
public static final Class<?> Cls_ref_type = Integer.class;
public static final int
Min_value = Integer.MIN_VALUE

View File

@ -18,7 +18,7 @@ import gplx.core.primitives.*;
import gplx.core.ios.*; /*IoItmFil, IoItmDir..*/ import gplx.core.ios.streams.*; import gplx.core.ios.loaders.*; import gplx.core.ios.atrs.*;
public class Io_mgr implements Gfo_evt_mgr_owner { // exists primarily to gather all cmds under gplx namespace; otherwise need to use gplx.core.ios whenever copying/deleting file
public Io_mgr() {evt_mgr = new Gfo_evt_mgr(this);}
public Gfo_evt_mgr Evt_mgr() {return evt_mgr;} private final Gfo_evt_mgr evt_mgr;
public Gfo_evt_mgr Evt_mgr() {return evt_mgr;} private final Gfo_evt_mgr evt_mgr;
public boolean Exists(Io_url url) {return url.Type_dir() ? ExistsDir(url) : ExistsFil(url);}
public boolean ExistsFil(Io_url url) {return IoEnginePool.Instance.Get_by(url.Info().EngineKey()).ExistsFil_api(url);}
public void ExistsFilOrFail(Io_url url) {if (!ExistsFil(url)) throw Err_.new_wo_type("could not find file", "url", url);}
@ -91,7 +91,7 @@ public class Io_mgr implements Gfo_evt_mgr_owner { // exists primarily to gather
byte[] bry = LoadFilBry_reuse(url, Bry_.Empty, len);
bfr.Bfr_init(bry, len.Val());
}
public static final byte[] LoadFilBry_fail = Bry_.Empty;
public static final byte[] LoadFilBry_fail = Bry_.Empty;
public byte[] LoadFilBry_reuse(Io_url url, byte[] ary, Int_obj_ref ary_len) {
if (loader != null) {
byte[] rv = loader.Load_fil_as_bry(url);
@ -152,11 +152,11 @@ public class Io_mgr implements Gfo_evt_mgr_owner { // exists primarily to gather
public boolean DownloadFil(String src, Io_url trg) {return IoEngine_xrg_downloadFil.new_(src, trg).Exec();}
public IoEngine_xrg_downloadFil DownloadFil_args(String src, Io_url trg) {return IoEngine_xrg_downloadFil.new_(src, trg);}
public boolean Query_read_only(Io_url url, int read_only_type) {return IoEngineUtl.Query_read_only(IoEnginePool.Instance.Get_by(url.Info().EngineKey()), url, read_only_type);}
public static final Io_mgr Instance = new Io_mgr();
public static final Io_mgr Instance = new Io_mgr();
public static final int Len_kb = 1024, Len_mb = 1048576, Len_gb = 1073741824, Len_gb_2 = 2147483647;
public static final long Len_mb_long = Len_mb;
public static final long Len_null = -1;
public static final String Evt__fil_created = "fil_created";
public static final String Evt__fil_created = "fil_created";
public static final int Read_only__basic__file = 1, Read_only__basic__file_and_dirs = 2, Read_only__perms__file = 3;
}
class Io_mgr_ {

View File

@ -17,14 +17,14 @@ package gplx;
import gplx.core.strings.*; import gplx.core.ios.*; /*IoUrlInfo*/ import gplx.core.envs.*; import gplx.langs.htmls.*; import gplx.core.interfaces.*;
public class Io_url implements CompareAble, ParseAble, Gfo_invk { //_20101005 URL:doc/Io_url.txt
public IoUrlInfo Info() {return info;} IoUrlInfo info;
public String Raw() {return raw;} final String raw;
public String Raw() {return raw;} final String raw;
public byte[] RawBry() {return Bry_.new_u8(raw);}
public String To_http_file_str() {return String_.Len_eq_0(raw) ? String_.Empty : String_.Concat (Http_file_str, Http_file_str_encoder.Encode_str(raw));}
public byte[] To_http_file_bry() {return String_.Len_eq_0(raw) ? Bry_.Empty : Bry_.Add (Http_file_bry, Http_file_str_encoder.Encode_bry(raw));}
public static Url_encoder_interface Http_file_str_encoder = Url_encoder_interface_same.Instance;
public static final String Http_file_str = "file:///";
public static final int Http_file_len = String_.Len(Http_file_str);
public static final byte[] Http_file_bry = Bry_.new_a7(Http_file_str);
public static final String Http_file_str = "file:///";
public static final int Http_file_len = String_.Len(Http_file_str);
public static final byte[] Http_file_bry = Bry_.new_a7(Http_file_str);
public boolean Type_dir() {return info.IsDir(raw);} public boolean Type_fil() {return !info.IsDir(raw);}
public Io_url OwnerDir() {return Io_url_.new_inf_(info.OwnerDir(raw), info);}
public Io_url OwnerRoot() {return Io_url_.new_inf_(info.OwnerRoot(raw), info);}

View File

@ -16,9 +16,9 @@ Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
package gplx;
import gplx.core.ios.*; /*IoUrlInfo_*/ import gplx.core.stores.*; import gplx.core.envs.*;
public class Io_url_ {
public static final Io_url Empty = new Io_url("", IoUrlInfo_.Nil);
public static final Io_url NullPtr = null;
public static final Io_url Parser = new Io_url("", IoUrlInfo_.Nil);
public static final Io_url Empty = new Io_url("", IoUrlInfo_.Nil);
public static final Io_url NullPtr = null;
public static final Io_url Parser = new Io_url("", IoUrlInfo_.Nil);
public static Io_url as_(Object obj) {return obj instanceof Io_url ? (Io_url)obj : null;}
public static Io_url cast(Object obj) {try {return (Io_url)obj;} catch(Exception exc) {throw Err_.new_type_mismatch_w_exc(exc, Io_url.class, obj);}}
public static Io_url Usr() {

View File

@ -16,7 +16,7 @@ Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
package gplx;
import org.junit.*; import gplx.core.tests.*; import gplx.core.envs.*;
public class Io_url__tst {
@Before public void init() {fxt.Clear();} private final Io_url__fxt fxt = new Io_url__fxt();
@Before public void init() {fxt.Clear();} private final Io_url__fxt fxt = new Io_url__fxt();
@Test public void Basic__lnx() {fxt.Test__New__http_or_null(Bool_.N, "file:///C:/a.txt", "C:/a.txt");}
@Test public void Basic__wnt() {fxt.Test__New__http_or_null(Bool_.Y, "file:///C:/a.txt", "C:\\a.txt");}
@Test public void Null() {fxt.Test__New__http_or_null(Bool_.N, "C:/a.txt", null);}

View File

@ -16,7 +16,7 @@ Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
package gplx;
import gplx.core.strings.*;
public class Keyval_ {
public static final Keyval[] Ary_empty = new Keyval[0];
public static final Keyval[] Ary_empty = new Keyval[0];
public static Keyval[] Ary(Keyval... ary) {return ary;}
public static Keyval[] Ary_cast_(Object o) {
try {return (Keyval[])o;}

View File

@ -15,7 +15,7 @@ Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
*/
package gplx;
public class Keyval_hash {
private final Ordered_hash hash = Ordered_hash_.New();
private final Ordered_hash hash = Ordered_hash_.New();
public int Count() {return hash.Count();}
public int Len() {return hash.Count();}
public Keyval_hash Clear() {hash.Clear(); return this;}

View File

@ -15,7 +15,7 @@ Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
*/
package gplx;
public class Keyval_list {
public int Count() {return list.Count();} private final List_adp list = List_adp_.New();
public int Count() {return list.Count();} private final List_adp list = List_adp_.New();
public void Clear() {list.Clear();}
public Keyval Get_at(int i) {return (Keyval)list.Get_at(i);}
public Keyval_list Add(String key, Object val) {list.Add(Keyval_.new_(key, val)); return this;}

View File

@ -16,7 +16,7 @@ Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
package gplx;
import gplx.core.lists.*;
public class List_adp_ {
public static final List_adp Noop = new List_adp_noop();
public static final List_adp Noop = new List_adp_noop();
public static List_adp New() {return new List_adp_obj();}
public static List_adp New_w_size(int v) {return new List_adp_obj(v);}
public static List_adp New_by_many(Object... ary) {
@ -49,5 +49,5 @@ public class List_adp_ {
list.Del_at(last_idx);
return rv;
}
public static final int Not_found = -1, Base1 = 1;
public static final int Not_found = -1, Base1 = 1;
}

View File

@ -64,12 +64,12 @@ public abstract class List_adp_base implements List_adp, Gfo_invk {
if (Object_.Eq(list[i], o)) return i;
return List_adp_.Not_found;
}
@gplx.Virtual public void Clear() {
public void Clear() {
for (int i = 0; i < count; i++)
list[i] = null;
count = 0;
}
@gplx.Virtual public void Del_at(int index) {if (index >= count || index < 0) throw Err_.new_missing_idx(index, count);
public void Del_at(int index) {if (index >= count || index < 0) throw Err_.new_missing_idx(index, count);
Collapse(index);
count--;
}
@ -102,7 +102,7 @@ public abstract class List_adp_base implements List_adp, Gfo_invk {
list[rhs] = temp;
}
}
@gplx.Virtual public void Shuffle() {// REF: Fisher-Yates shuffle
public void Shuffle() {// REF: Fisher-Yates shuffle
RandomAdp random = RandomAdp_.new_();
for (int i = count; i > 1; i--) {
int rndIdx = random.Next(i);

View File

@ -16,7 +16,7 @@ Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
package gplx;
public class Long_ {
public static final String Cls_val_name = "long";
public static final Class<?> Cls_ref_type = Long.class;
public static final Class<?> Cls_ref_type = Long.class;
public static final int Log10Ary_len = 21;
public static long[] Log10Ary = new long[]
{ 1, 10, 100, 1000, 10000

View File

@ -16,7 +16,7 @@ Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
package gplx;
public class Object_ {
public static final String Cls_val_name = "Object";
public static final Object[] Ary_empty = new Object[0];
public static final Object[] Ary_empty = new Object[0];
public static Object[] Ary(Object... ary) {return ary;}
public static Object[] Ary_add(Object[] lhs, Object[] rhs) {
int lhs_len = lhs.length, rhs_len = rhs.length;
@ -63,6 +63,6 @@ public class Object_ {
else if (Type_.Eq(c, Double_.Cls_ref_type)) return Double_.To_str_loose(Double_.cast(v));
else return v.toString();
}
public static final Object Null = null;
public static final byte[] Bry__null = Bry_.new_a7("null");
public static final Object Null = null;
public static final byte[] Bry__null = Bry_.new_a7("null");
}

View File

@ -17,7 +17,7 @@ package gplx;
import gplx.core.strings.*; import gplx.core.envs.*;
import gplx.core.lists.*; /*EnumerAble,ComparerAble*/
public class Ordered_hash_base extends Hash_adp_base implements Ordered_hash, Gfo_invk {
private final List_adp ordered = List_adp_.New();
private final List_adp ordered = List_adp_.New();
@Override protected void Add_base(Object key, Object val) {
super.Add_base(key, val);
ordered.Add(val);
@ -43,7 +43,7 @@ public class Ordered_hash_base extends Hash_adp_base implements Ordered_hash, Gf
this.Clear();
return rv;
}
@gplx.Virtual public void Sort() {if (locked) Lock_fail(); ordered.Sort();} // NOTE: uses item's .compareTo
public void Sort() {if (locked) Lock_fail(); ordered.Sort();} // NOTE: uses item's .compareTo
public void Sort_by(ComparerAble comparer) {if (locked) Lock_fail(); ordered.Sort_by(comparer);}
@Override public java.util.Iterator iterator() {return ordered.iterator();}
public void Add_at(int i, Object key, Object val) {
@ -95,7 +95,7 @@ public class Ordered_hash_base extends Hash_adp_base implements Ordered_hash, Gf
}
else return Gfo_invk_.Rv_unhandled;
return this;
} static final String Invk_SetKeyOnly = "SetKeyOnly", Invk_Print = "Print";
} static final String Invk_SetKeyOnly = "SetKeyOnly", Invk_Print = "Print";
@Override public int Count() {return ordered.Count();}
public Ordered_hash_base() {}
}

View File

@ -23,6 +23,6 @@ public class RandomAdp_ implements Gfo_invk {
public Object Invk(GfsCtx ctx, int ikey, String k, GfoMsg m) {
if (ctx.Match(k, Invk_Next)) return RandomAdp_.new_().Next(m.ReadInt("max"));
else return Gfo_invk_.Rv_unhandled;
} static final String Invk_Next = "Next";
public static final RandomAdp_ Gfs = new RandomAdp_();
} static final String Invk_Next = "Next";
public static final RandomAdp_ Gfs = new RandomAdp_();
}

View File

@ -16,7 +16,7 @@ Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
package gplx;
public class Short_ {
public static final String Cls_val_name = "short";
public static final Class<?> Cls_ref_type = Short.class;
public static final Class<?> Cls_ref_type = Short.class;
public static short cast(Object obj) {try {return (Short)obj;} catch(Exception exc) {throw Err_.new_type_mismatch_w_exc(exc, short.class, obj);}}
public static short By_int(int v) {return (short)v;}

View File

@ -19,7 +19,7 @@ import gplx.core.strings.String_bldr;
import gplx.core.strings.String_bldr_;
public class String_ {
// -------- BASELIB_COPY --------
public static final Class<?> Cls_ref_type = String.class;
public static final Class<?> Cls_ref_type = String.class;
public static final String Cls_val_name = "str" + "ing";
public static final int Find_none = -1, Pos_neg1 = -1;
public static final String Empty = "", Null_mark = "<<NULL>>", Tab = "\t", Lf = "\n", CrLf = "\r\n", Nl = "\n";
@ -415,7 +415,7 @@ public class String_ {
sb.Add(s).Add(";");
return sb.To_str();
}
public static final String[] Ary_empty = new String[0];
public static final String[] Ary_empty = new String[0];
public static String[] Split(String raw, char dlm) {return Split(raw, dlm, false);}
public static String[] Split(String raw, char dlm, boolean addEmptyIfDlmIsLast) {
List_adp list = List_adp_.New(); String_bldr sb = String_bldr_.new_();

View File

@ -137,9 +137,9 @@ public class Tfds { // URL:doc/gplx.tfds/Tfds.txt
public static void Err_has(Exception e, String hdr) {
Tfds.Eq_true(String_.Has(Err_.Message_gplx_full(e), hdr), "could not find '{0}' in '{1}'", hdr, Err_.Message_gplx_full(e));
}
static final String EmptyStr = TfdsMsgBldr.EmptyStr;
static final String EmptyStr = TfdsMsgBldr.EmptyStr;
static TfdsMsgBldr msgBldr = TfdsMsgBldr.new_();
public static final Io_url RscDir = Io_url_.Usr().GenSubDir_nest("000", "200_dev", "190_tst");
public static final Io_url RscDir = Io_url_.Usr().GenSubDir_nest("000", "200_dev", "190_tst");
public static void WriteText(String text) {Console_adp__sys.Instance.Write_str(text);}
public static void Write(byte[] s, int b, int e) {Write(Bry_.Mid(s, b, e));}
public static void Write() {Write("tmp");}
@ -156,7 +156,7 @@ class TfdsEqListItmStr_cls_default implements TfdsEqListItmStr {
public String To_str(Object cur, Object actl) {
return Object_.Xto_str_strict_or_null_mark(cur);
}
public static final TfdsEqListItmStr_cls_default Instance = new TfdsEqListItmStr_cls_default(); TfdsEqListItmStr_cls_default() {}
public static final TfdsEqListItmStr_cls_default Instance = new TfdsEqListItmStr_cls_default(); TfdsEqListItmStr_cls_default() {}
}
class TfdsEqAryItm {
public int Idx() {return idx;} public TfdsEqAryItm Idx_(int v) {idx = v; return this;} int idx;
@ -230,5 +230,5 @@ class TfdsMsgBldr {
);
}
public static TfdsMsgBldr new_() {return new TfdsMsgBldr();} TfdsMsgBldr() {}
public static final String EmptyStr = "";
public static final String EmptyStr = "";
}

View File

@ -93,5 +93,5 @@ class TfdsTstrItm {
return compareResult == 1 ? "==" : "!=";
}
public static TfdsTstrItm new_() {return new TfdsTstrItm();} TfdsTstrItm() {}
public static final int CompareResult_none = 0, CompareResult_eq = 1, CompareResult_eqn = 2;
public static final int CompareResult_none = 0, CompareResult_eq = 1, CompareResult_eqn = 2;
}

View File

@ -16,8 +16,8 @@ Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
package gplx;
import gplx.core.strings.*; import gplx.core.envs.*;
public class Time_span_ {
public static final Time_span Zero = new Time_span(0);
public static final Time_span Null = new Time_span(-1);
public static final Time_span Zero = new Time_span(0);
public static final Time_span Null = new Time_span(-1);
public static Time_span fracs_(long val) {return new Time_span(val);}
public static Time_span seconds_(double seconds) {
long fracs = (long)(seconds * Divisors[Idx_Sec]);
@ -138,18 +138,18 @@ public class Time_span_ {
}
return rv;
}
public static final String Fmt_PadZeros = "00:00:00.000"; // u,h00:m00:s00.f000
public static final String Fmt_Short = "short"; // u,h##:m#0:s00;
public static final String Fmt_Default = "0.000"; // v,#.000
public static final String Fmt_NoFractionals = "0"; // v,#
@gplx.Internal protected static final int[] Divisors = {
public static final String Fmt_PadZeros = "00:00:00.000"; // u,h00:m00:s00.f000
public static final String Fmt_Short = "short"; // u,h##:m#0:s00;
public static final String Fmt_Default = "0.000"; // v,#.000
public static final String Fmt_NoFractionals = "0"; // v,#
@gplx.Internal protected static final int[] Divisors = {
1, //1 fracs
1000, //1,000 fracs in a second
60000, //60,000 fracs in a minute (60 seconds * 1,000)
3600000, //3,600,000 fracs in an hour (60 minutes * 60,000)
};
public static final String MajorDelimiter = ":";
public static final int
public static final String MajorDelimiter = ":";
public static final int
Idx_Frac = 0
, Idx_Sec = 1
, Idx_Min = 2

View File

@ -16,7 +16,7 @@ Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
package gplx;
import gplx.core.stores.*;
public class Yn {
public static final String Y = "y", N = "n";
public static final String Y = "y", N = "n";
public static boolean parse_by_char_or(String v, boolean or) {
if (String_.Eq(v, Y)) return true;
else if (String_.Eq(v, N)) return false;

View File

@ -15,10 +15,10 @@ Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
*/
package gplx.core.brys; import gplx.*; import gplx.core.*;
public class Bry_bfr_mkr {
public Bry_bfr Get_b128() {return mkr_b128.Get();} private final Bry_bfr_mkr_mgr mkr_b128 = new Bry_bfr_mkr_mgr(Tid_b128, 128);
public Bry_bfr Get_b512() {return mkr_b512.Get();} private final Bry_bfr_mkr_mgr mkr_b512 = new Bry_bfr_mkr_mgr(Tid_b512, 512);
public Bry_bfr Get_k004() {return mkr_k004.Get();} private final Bry_bfr_mkr_mgr mkr_k004 = new Bry_bfr_mkr_mgr(Tid_k004, 4 * Io_mgr.Len_kb);
public Bry_bfr Get_m001() {return mkr_m001.Get();} private final Bry_bfr_mkr_mgr mkr_m001 = new Bry_bfr_mkr_mgr(Tid_m001, 1 * Io_mgr.Len_mb);
public Bry_bfr Get_b128() {return mkr_b128.Get();} private final Bry_bfr_mkr_mgr mkr_b128 = new Bry_bfr_mkr_mgr(Tid_b128, 128);
public Bry_bfr Get_b512() {return mkr_b512.Get();} private final Bry_bfr_mkr_mgr mkr_b512 = new Bry_bfr_mkr_mgr(Tid_b512, 512);
public Bry_bfr Get_k004() {return mkr_k004.Get();} private final Bry_bfr_mkr_mgr mkr_k004 = new Bry_bfr_mkr_mgr(Tid_k004, 4 * Io_mgr.Len_kb);
public Bry_bfr Get_m001() {return mkr_m001.Get();} private final Bry_bfr_mkr_mgr mkr_m001 = new Bry_bfr_mkr_mgr(Tid_m001, 1 * Io_mgr.Len_mb);
public void Clear() {
for (byte i = Tid_b128; i <= Tid_m001; i++)
mkr(i).Clear();

View File

@ -15,8 +15,8 @@ Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
*/
package gplx.core.brys; import gplx.*; import gplx.core.*;
public class Bry_bfr_mkr_mgr {
private final Object thread_lock = new Object();
private final byte mgr_id; private final int reset;
private final Object thread_lock = new Object();
private final byte mgr_id; private final int reset;
private Bry_bfr[] used = Bry_bfr_.Ary_empty; private int used_len = 0, used_max = 0;
private int[] free; private int free_len;
public Bry_bfr_mkr_mgr(byte mgr_id, int reset) {// NOTE: random IndexOutOfBounds errors in Get around free[--free_len] with free_len being -1; put member variable initialization within thread_lock to try to avoid; DATE:2014-09-21

View File

@ -24,8 +24,8 @@ import gplx.String_;
import gplx.core.btries.Btrie_rv;
import gplx.core.btries.Btrie_slim_mgr;
public class Bry_rdr {
private final gplx.core.primitives.Int_obj_ref pos_ref = gplx.core.primitives.Int_obj_ref.New_neg1();
private final Btrie_rv trv = new Btrie_rv();
private final gplx.core.primitives.Int_obj_ref pos_ref = gplx.core.primitives.Int_obj_ref.New_neg1();
private final Btrie_rv trv = new Btrie_rv();
public byte[] Src() {return src;} protected byte[] src;
public int Src_end() {return src_end;} protected int src_end;
public int Pos() {return pos;} protected int pos;

View File

@ -104,7 +104,7 @@ public class Bry_rdr_old {
byte[] double_bry = Read_bry_to(to_char);
return Double_.parse(String_.new_a7(double_bry)); // double will never have utf8
}
@gplx.Virtual public Bry_rdr_old Skip_ws() {
public Bry_rdr_old Skip_ws() {
while (pos < src_len) {
switch (src[pos]) {
case Byte_ascii.Tab: case Byte_ascii.Nl: case Byte_ascii.Cr: case Byte_ascii.Space:

View File

@ -16,7 +16,7 @@ Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
package gplx.core.brys.args; import gplx.*; import gplx.core.*; import gplx.core.brys.*;
import gplx.core.brys.*;
public class Bfr_arg__bry_fmt implements Bfr_arg {
private final Bry_fmt fmt;
private final Bry_fmt fmt;
private Object[] arg_ary;
public Bfr_arg__bry_fmt(Bry_fmt fmt, Object... arg_ary) {
this.fmt = fmt;

View File

@ -232,8 +232,8 @@ public class Bry_fmtr {
public boolean Fmt_args_exist() {return fmt_args_exist;} private boolean fmt_args_exist;
boolean dirty = true;
int baseInt = 0;
public static final byte char_escape = Byte_ascii.Tilde, char_arg_bgn = Byte_ascii.Curly_bgn, char_arg_end = Byte_ascii.Curly_end, char_escape_nl = Byte_ascii.Ltr_n, char_escape_tab = Byte_ascii.Ltr_t, char_eval_bgn = Byte_ascii.Lt, char_eval_end = Byte_ascii.Gt;
public static final Bry_fmtr Null = new Bry_fmtr().Fmt_("");
public static final byte char_escape = Byte_ascii.Tilde, char_arg_bgn = Byte_ascii.Curly_bgn, char_arg_end = Byte_ascii.Curly_end, char_escape_nl = Byte_ascii.Ltr_n, char_escape_tab = Byte_ascii.Ltr_t, char_eval_bgn = Byte_ascii.Lt, char_eval_end = Byte_ascii.Gt;
public static final Bry_fmtr Null = new Bry_fmtr().Fmt_("");
public static Bry_fmtr New__tmp() {return new Bry_fmtr().Fmt_("").Keys_();}
public static Bry_fmtr new_(String fmt, String... keys) {return new Bry_fmtr().Fmt_(fmt).Keys_(keys);} // NOTE: keys may seem redundant, but are needed to align ordinals with proc; EX: fmt may be "~{A} ~{B}" or "~{B} ~{A}"; call will always be Bld(a, b); passing in "A", "B" guarantees A is 0 and B is 1;
public static Bry_fmtr new_(byte[] fmt, String... keys) {return new Bry_fmtr().Fmt_(fmt).Keys_(keys);} // NOTE: keys may seem redundant, but are needed to align ordinals with proc; EX: fmt may be "~{A} ~{B}" or "~{B} ~{A}"; call will always be Bld(a, b); passing in "A", "B" guarantees A is 0 and B is 1;

View File

@ -16,7 +16,7 @@ Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
package gplx.core.brys.fmtrs; import gplx.*; import gplx.core.*; import gplx.core.brys.*;
import org.junit.*;
public class Bry_fmtr_tst {
private final Bry_fmtr_fxt fxt = new Bry_fmtr_fxt();
private final Bry_fmtr_fxt fxt = new Bry_fmtr_fxt();
@Test public void Text() {fxt.Clear().Fmt("a").Test("a");}
@Test public void Idx__1() {fxt.Clear().Fmt("~{0}").Args("a").Test("a");}
@Test public void Idx__3() {fxt.Clear().Fmt("~{0}~{1}~{2}").Args("a", "b", "c").Test("abc");}
@ -53,8 +53,8 @@ class Bry_fmtr_tst_mok implements Bry_fmtr_eval_mgr {
}
}
class Bry_fmtr_fxt {
private final Bry_fmtr fmtr = Bry_fmtr.new_();
private final Bry_bfr bfr = Bry_bfr_.New();
private final Bry_fmtr fmtr = Bry_fmtr.new_();
private final Bry_bfr bfr = Bry_bfr_.New();
private Object[] args;
public Bry_fmtr_fxt Clear() {fmtr.Fmt_(String_.Empty).Keys_(String_.Empty); args = Object_.Ary_empty; return this;}
public Bry_fmtr_fxt Fmt (String fmt) {fmtr.Fmt_(fmt); return this;}

View File

@ -16,7 +16,7 @@ Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
package gplx.core.brys.fmtrs; import gplx.*; import gplx.core.*; import gplx.core.brys.*;
import gplx.core.brys.*;
public class Bry_fmtr_vals implements Bfr_arg {
private final Bry_fmtr fmtr; private Object[] vals;
private final Bry_fmtr fmtr; private Object[] vals;
Bry_fmtr_vals(Bry_fmtr fmtr) {this.fmtr = fmtr;}
public Bry_fmtr_vals Vals_(Object... v) {this.vals = v; return this;}
public void Bfr_arg__add(Bry_bfr bfr) {

View File

@ -87,5 +87,5 @@ public class Bry_fmt_parser_ {
pos = rhs_pos; // NOTE: auto-increment done at top of loop
}
return (byte[][])list.To_ary(byte[].class);
} private static final byte[] Bry_arg_lhs = Bry_.new_a7("~{");
} private static final byte[] Bry_arg_lhs = Bry_.new_a7("~{");
}

View File

@ -16,7 +16,7 @@ Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
package gplx.core.brys.fmts; import gplx.*; import gplx.core.*; import gplx.core.brys.*;
import org.junit.*;
public class Bry_fmt_tst {
private final Bry_fmt_fxt fxt = new Bry_fmt_fxt();
private final Bry_fmt_fxt fxt = new Bry_fmt_fxt();
@Test public void Text() {fxt.Clear().Fmt("a").Test("a");}
@Test public void Key__basic() {fxt.Clear().Fmt("~{key}").Vals("a").Test("a");}
@Test public void Key__mult() {fxt.Clear().Fmt("~{key1}~{key2}").Vals("a", "b").Test("ab");}
@ -35,8 +35,8 @@ class Bfr_fmt_arg_mok implements Bfr_arg {
}
}
class Bry_fmt_fxt {
private final Bry_fmt fmt = new Bry_fmt(Bry_.Empty, Bry_.Ary_empty, Bfr_fmt_arg.Ary_empty);
private final Bry_bfr bfr = Bry_bfr_.New();
private final Bry_fmt fmt = new Bry_fmt(Bry_.Empty, Bry_.Ary_empty, Bfr_fmt_arg.Ary_empty);
private final Bry_bfr bfr = Bry_bfr_.New();
private Object[] vals;
public Bry_fmt_fxt Clear() {vals = Object_.Ary_empty; return this;}
public Bry_fmt_fxt Fmt(String s) {fmt.Fmt_(s); return this;}

View File

@ -16,7 +16,7 @@ Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
package gplx.core.brys.fmts; import gplx.*; import gplx.core.*; import gplx.core.brys.*;
import org.junit.*;
public class Bry_keys_parser_tst {
private final Bry_keys_parser_fxt fxt = new Bry_keys_parser_fxt();
private final Bry_keys_parser_fxt fxt = new Bry_keys_parser_fxt();
@Test public void None() {fxt.Test("a");}
@Test public void One() {fxt.Test("~{a}" , "a");}
@Test public void Many() {fxt.Test("~{a}b~{c}d~{e}" , "a", "c", "e");}

View File

@ -95,7 +95,7 @@ public class Btrie_slim_itm {
}
if (found) --ary_len;
}
public static final Btrie_slim_itm[] Ary_empty = new Btrie_slim_itm[0]; int ary_len = 0, ary_max = 0;
public static final Btrie_slim_itm[] Ary_empty = new Btrie_slim_itm[0]; int ary_len = 0, ary_max = 0;
}
class ByteHashItm_sorter {// quicksort
Btrie_slim_itm[] ary; int ary_len;
@ -126,5 +126,5 @@ class ByteHashItm_sorter {// quicksort
if (lo < j) Sort_recurse(lo, j);
if (i < hi) Sort_recurse(i, hi);
}
public static final ByteHashItm_sorter Instance = new ByteHashItm_sorter(); ByteHashItm_sorter() {}
public static final ByteHashItm_sorter Instance = new ByteHashItm_sorter(); ByteHashItm_sorter() {}
}

View File

@ -95,7 +95,7 @@ public class Btrie_slim_mgr_tst {
}
}
class Btrie_slim_mgr_fxt {
private final Btrie_slim_mgr trie = Btrie_slim_mgr.cs();
private final Btrie_slim_mgr trie = Btrie_slim_mgr.cs();
public Btrie_slim_mgr_fxt Init__add(String key, String val) {
trie.Add_str_str(key, val);
return this;

View File

@ -15,7 +15,7 @@ Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
*/
package gplx.core.caches; import gplx.*; import gplx.core.*;
public class Lru_cache {
private final Hash_adp map = Hash_adp_.New();
private final Hash_adp map = Hash_adp_.New();
private Lru_node head, tail;
private long cur, min, max, evicts;
public Lru_cache(boolean auto_reg, String key, long min, long max) {
@ -24,7 +24,7 @@ public class Lru_cache {
this.max = max;
if (auto_reg) Lru_cache_root.Instance.Add(this);
}
public String Key() {return key;} private final String key;
public String Key() {return key;} private final String key;
public long Evicts() {return evicts;}
public long Cur() {return cur;}
public void Min_max_(long min, long max) {
@ -132,9 +132,9 @@ public class Lru_cache {
}
}
class Lru_node {
private final Object key;
private final Object key;
private Object val;
private final long size;
private final long size;
private Lru_node prv;
private Lru_node nxt;

View File

@ -15,7 +15,7 @@ Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
*/
package gplx.core.caches; import gplx.*; import gplx.core.*;
public class Lru_cache_root {
private final Ordered_hash hash = Ordered_hash_.New();
private final Ordered_hash hash = Ordered_hash_.New();
public Lru_cache Get_by_key(String key) {return (Lru_cache)hash.Get_by(key);}
public void Add(Lru_cache grp) {
hash.Add(grp.Key(), grp);
@ -46,5 +46,5 @@ public class Lru_cache_root {
}
return bfr.To_str_and_clear();
}
public static final Lru_cache_root Instance = new Lru_cache_root();
public static final Lru_cache_root Instance = new Lru_cache_root();
}

View File

@ -16,7 +16,7 @@ Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
package gplx.core.caches; import gplx.*; import gplx.core.*;
import org.junit.*; import gplx.core.tests.*;
public class Lru_cache_tst {
private final Lru_cache_fxt fxt = new Lru_cache_fxt();
private final Lru_cache_fxt fxt = new Lru_cache_fxt();
@Test public void Get_one() {
fxt.Exec__set("a", 5);
fxt.Test__get_y("a");
@ -73,7 +73,7 @@ public class Lru_cache_tst {
}
}
class Lru_cache_fxt {
private final Lru_cache cache = new Lru_cache(Bool_.N, "test", -1, 10);
private final Lru_cache cache = new Lru_cache(Bool_.N, "test", -1, 10);
public void Exec__set(String key, long size) {
cache.Set(key, key, size);
}

View File

@ -15,8 +15,8 @@ Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
*/
package gplx.core.consoles; import gplx.*; import gplx.core.*;
public class Console_adp__mem implements Console_adp {
private final List_adp written = List_adp_.New();
private final Hash_adp ignored = Hash_adp_.New();
private final List_adp written = List_adp_.New();
private final Hash_adp ignored = Hash_adp_.New();
public boolean Enabled() {return true;}
public boolean Canceled_chk() {return false;}
public int Chars_per_line_max() {return 80;} public void Chars_per_line_max_(int v) {}

View File

@ -61,5 +61,5 @@ public class Console_adp__sys implements Console_adp {
catch (java.io.UnsupportedEncodingException e) {throw Err_.new_wo_type("unsupported exception");}
ps.println(s);
}
public static final Console_adp__sys Instance = new Console_adp__sys();
public static final Console_adp__sys Instance = new Console_adp__sys();
}

View File

@ -16,8 +16,8 @@ Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
package gplx.core.criterias; import gplx.*; import gplx.core.*;
import gplx.core.texts.*; /*RegxPatn_cls_like*/
public class Criteria_ {
public static final Criteria All = new Criteria_const(true);
public static final Criteria None = new Criteria_const(false);
public static final Criteria All = new Criteria_const(true);
public static final Criteria None = new Criteria_const(false);
public static Criteria Not(Criteria arg) {return new Criteria_not(arg);}
public static Criteria And(Criteria lhs, Criteria rhs) {return new Criteria_and(lhs, rhs);}
public static Criteria And_many(Criteria... ary) {

View File

@ -17,7 +17,7 @@ package gplx.core.criterias; import gplx.*; import gplx.core.*;
public class Criteria_between implements Criteria {
public Criteria_between(boolean neg, Comparable lo, Comparable hi) {this.neg = neg; this.lo = lo; this.hi = hi;}
public byte Tid() {return Criteria_.Tid_between;}
public boolean Neg() {return neg;} private final boolean neg;
public boolean Neg() {return neg;} private final boolean neg;
public Comparable Lo() {return lo;} private Comparable lo; public void Lo_(Comparable v) {this.lo = v;}
public Comparable Hi() {return hi;} private Comparable hi; public void Hi_(Comparable v) {this.hi = v;}
public void Val_from_args(Hash_adp args) {throw Err_.new_unimplemented();}

View File

@ -17,7 +17,7 @@ package gplx.core.criterias; import gplx.*; import gplx.core.*;
public class Criteria_eq implements Criteria {
@gplx.Internal protected Criteria_eq(boolean neg, Object val) {this.neg = neg; this.val = val;}
public byte Tid() {return Criteria_.Tid_eq;}
public boolean Neg() {return neg;} private final boolean neg;
public boolean Neg() {return neg;} private final boolean neg;
public Object Val() {return val;} private Object val;
public void Val_as_obj_(Object v) {this.val = v;}
public void Val_from_args(Hash_adp args) {throw Err_.new_unimplemented();}

View File

@ -17,9 +17,9 @@ package gplx.core.criterias; import gplx.*; import gplx.core.*;
public class Criteria_fld implements Criteria {
Criteria_fld(String pre, String key, Criteria crt) {this.pre = pre; this.key = key; this.crt = crt;}
public byte Tid() {return Criteria_.Tid_wrapper;}
public String Pre() {return pre;} private final String pre;
public String Key() {return key;} private final String key;
public Criteria Crt() {return crt;} private final Criteria crt;
public String Pre() {return pre;} private final String pre;
public String Key() {return key;} private final String key;
public Criteria Crt() {return crt;} private final Criteria crt;
public String Pre_w_key() {return pre == Pre_null ? key : String_.Concat(pre, ".", key);}
public void Val_as_obj_(Object v) {throw Err_.new_unimplemented();}
public void Val_from_args(Hash_adp args) {

View File

@ -17,7 +17,7 @@ package gplx.core.criterias; import gplx.*; import gplx.core.*;
public class Criteria_in implements Criteria {
public Criteria_in(boolean neg, Object[] ary) {this.neg = neg; Ary_(ary);}
public byte Tid() {return Criteria_.Tid_in;}
public boolean Neg() {return neg;} private final boolean neg;
public boolean Neg() {return neg;} private final boolean neg;
public Object[] Ary() {return ary;} private Object[] ary;
public int Ary_len() {return ary_len;} private int ary_len;
public Class<?> Itm_type() {return itm_type;} private Class<?> itm_type;

View File

@ -18,7 +18,7 @@ import gplx.core.texts.*;
public class Criteria_ioMatch implements Criteria { // EX: url IOMATCH '*.xml|*.txt'
public Criteria_ioMatch(boolean match, RegxPatn_cls_ioMatch pattern) {this.match = match; this.pattern = pattern;}
public byte Tid() {return Criteria_.Tid_iomatch;}
public boolean Neg() {return !match;} private final boolean match;
public boolean Neg() {return !match;} private final boolean match;
public void Val_from_args(Hash_adp args) {throw Err_.new_unimplemented();}
public void Val_as_obj_(Object v) {this.pattern = (RegxPatn_cls_ioMatch)v;}
public RegxPatn_cls_ioMatch Pattern() {return pattern;} private RegxPatn_cls_ioMatch pattern;

View File

@ -16,7 +16,7 @@ Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
package gplx.core.encoders; import gplx.*; import gplx.core.*;
import org.junit.*; import gplx.core.tests.*;
public class Hex_utl__tst {
private final Hex_utl__fxt fxt = new Hex_utl__fxt();
private final Hex_utl__fxt fxt = new Hex_utl__fxt();
@Test public void To_int() {
fxt.Test__to_int("0" , 0);
fxt.Test__to_int("F" , 15);
@ -73,7 +73,7 @@ class Hex_utl__fxt {
String actl = Hex_utl_.To_str(val, pad);
Tfds.Eq(expd, actl);
}
private final Bry_bfr bfr = Bry_bfr_.New();
private final Bry_bfr bfr = Bry_bfr_.New();
public void Test__write_bfr(boolean lcase, int val, String expd) {
Hex_utl_.Write_bfr(bfr, lcase, val);
Gftest.Eq__str(expd, bfr.To_str_and_clear());

View File

@ -51,6 +51,6 @@ public class Env_ {
return appUrl;
} static Io_url appUrl = Io_url_.Empty;
public static final String LocalHost = "127.0.0.1";
public static final String LocalHost = "127.0.0.1";
public static String NewLine_lang() {return mode_testing ? "\n" : "\n";}
}

View File

@ -18,16 +18,16 @@ public class Op_sys {
Op_sys(byte tid, byte sub_tid, String os_name, byte bitness, String nl_str, byte fsys_dir_spr_byte, boolean fsys_case_match) {
this.tid = tid; this.sub_tid = sub_tid; this.os_name = os_name; this.bitness = bitness; this.nl_str = nl_str; this.fsys_dir_spr_byte = fsys_dir_spr_byte; this.fsys_dir_spr_str = Char_.To_str((char)fsys_dir_spr_byte); this.fsys_case_match = fsys_case_match;
}
public byte Tid() {return tid;} private final byte tid;
public byte Sub_tid() {return sub_tid;} private final byte sub_tid;
public byte Tid() {return tid;} private final byte tid;
public byte Sub_tid() {return sub_tid;} private final byte sub_tid;
public String Os_name() {return os_name;} private String os_name;
public byte Bitness() {return bitness;} private final byte bitness;
public byte Bitness() {return bitness;} private final byte bitness;
public String Bitness_str() {return (bitness == Bitness_32 ? "32" : "64");}
public String Nl_str() {return nl_str;} private final String nl_str;
public String Fsys_dir_spr_str() {return fsys_dir_spr_str;} private final String fsys_dir_spr_str;
public byte Fsys_dir_spr_byte() {return fsys_dir_spr_byte;} private final byte fsys_dir_spr_byte;
public String Nl_str() {return nl_str;} private final String nl_str;
public String Fsys_dir_spr_str() {return fsys_dir_spr_str;} private final String fsys_dir_spr_str;
public byte Fsys_dir_spr_byte() {return fsys_dir_spr_byte;} private final byte fsys_dir_spr_byte;
public String Fsys_http_frag_to_url_str(String raw) {return fsys_dir_spr_byte == Byte_ascii.Slash ? raw : String_.Replace(raw, Lnx.Fsys_dir_spr_str(), fsys_dir_spr_str);}
public boolean Fsys_case_match() {return fsys_case_match;} private final boolean fsys_case_match;
public boolean Fsys_case_match() {return fsys_case_match;} private final boolean fsys_case_match;
public String Fsys_case_match_str(String s) {return String_.CaseNormalize(fsys_case_match, s);}
public boolean Tid_is_wnt() {return tid == Tid_wnt;}
public boolean Tid_is_lnx() {return tid == Tid_lnx;}
@ -38,12 +38,12 @@ public class Op_sys {
public static final byte Tid_nil = 0, Tid_wnt = 1, Tid_lnx = 2, Tid_osx = 3, Tid_drd = 4, Tid_arm = 5;
public static final byte Sub_tid_unknown = 0, Sub_tid_win_xp = 1, Sub_tid_win_7 = 2, Sub_tid_win_8 = 3;
public static final byte Bitness_32 = 1, Bitness_64 = 2;
public static final char Nl_char_lnx = '\n';
public static final char Nl_char_lnx = '\n';
public static final byte Dir_spr__lnx = Byte_ascii.Slash, Dir_spr__wnt = Byte_ascii.Backslash;
public static final Op_sys Lnx = new_unx_flavor_(Tid_lnx, "linux", Bitness_32);
public static final Op_sys Osx = new_unx_flavor_(Tid_osx, "macosx", Bitness_32);
public static final Op_sys Drd = new_unx_flavor_(Tid_drd, "android", Bitness_32);
public static final Op_sys Wnt = new_wnt_(Sub_tid_unknown, Bitness_32);
public static final Op_sys Lnx = new_unx_flavor_(Tid_lnx, "linux", Bitness_32);
public static final Op_sys Osx = new_unx_flavor_(Tid_osx, "macosx", Bitness_32);
public static final Op_sys Drd = new_unx_flavor_(Tid_drd, "android", Bitness_32);
public static final Op_sys Wnt = new_wnt_(Sub_tid_unknown, Bitness_32);
public static Op_sys Cur() {return cur_op_sys;} static Op_sys cur_op_sys = new_auto_identify_();
public static String Fsys_path_to_lnx(String v) {
return cur_op_sys.Tid_is_wnt() ? String_.Replace(v, Wnt.fsys_dir_spr_str, Lnx.fsys_dir_spr_str) : v;

View File

@ -63,7 +63,7 @@ public class Process_adp implements Gfo_invk, Rls_able {
public int Thread_timeout() {return thread_timeout;} public Process_adp Thread_timeout_seconds_(int v) {thread_timeout = v * 1000; return this;} int thread_timeout = 0;
public int Thread_interval() {return thread_interval;} public Process_adp Thread_interval_(int v) {thread_interval = v; return this;} int thread_interval = 20;
public String Thread_kill_name() {return thread_kill_name;} public Process_adp Thread_kill_name_(String v) {thread_kill_name = v; return this;} private String thread_kill_name = "";
public Io_url Tmp_dir() {return tmp_dir;} @gplx.Virtual public Process_adp Tmp_dir_(Io_url v) {tmp_dir = v; return this;} Io_url tmp_dir;
public Io_url Tmp_dir() {return tmp_dir;} public Process_adp Tmp_dir_(Io_url v) {tmp_dir = v; return this;} Io_url tmp_dir;
private Process_adp WhenBgn_run() {return Invk_cmds(whenBgnList);} List_adp whenBgnList = List_adp_.New();
public Process_adp WhenEnd_add(Gfo_invk_cmd cmd) {whenEndList.Add(cmd); return this;}
public Process_adp WhenEnd_del(Gfo_invk_cmd cmd) {whenEndList.Del(cmd); return this;}
@ -111,7 +111,7 @@ public class Process_adp implements Gfo_invk, Rls_able {
else return Gfo_invk_.Rv_unhandled;
return this;
}
static final String Invk_cmd = "cmd", Invk_cmd_ = "cmd_", Invk_args = "args", Invk_args_ = "args_", Invk_cmd_args_ = "cmd_args_", Invk_enabled = "enabled", Invk_enabled_ = "enabled_", Invk_mode_ = "mode_", Invk_timeout_ = "timeout_", Invk_tmp_dir_ = "tmp_dir_", Invk_owner = "owner";
static final String Invk_cmd = "cmd", Invk_cmd_ = "cmd_", Invk_args = "args", Invk_args_ = "args_", Invk_cmd_args_ = "cmd_args_", Invk_enabled = "enabled", Invk_enabled_ = "enabled_", Invk_mode_ = "mode_", Invk_timeout_ = "timeout_", Invk_tmp_dir_ = "tmp_dir_", Invk_owner = "owner";
Bry_fmtr_eval_mgr cmd_url_eval;
public static Process_adp ini_(Gfo_invk owner, Gfo_usr_dlg usr_dlg, Process_adp process, Bry_fmtr_eval_mgr cmd_url_eval, byte run_mode, int timeout, String cmd_url_fmt, String args_fmt, String... args_keys) {
process.Run_mode_(run_mode).Thread_timeout_seconds_(timeout);
@ -294,7 +294,7 @@ public class Process_adp implements Gfo_invk, Rls_able {
process.Process_run_and_end();
return;
}
public static final List_adp Test_runs = List_adp_.New();
public static final List_adp Test_runs = List_adp_.New();
private Process_adp Test_runs_add() {Test_runs.Add(exe_url.Raw() + " " + args_str); exit_code = Exit_pass; return this;}
public static int run_wait_arg_(Io_url url, String arg) {
Process_adp process = new Process_adp();

View File

@ -15,13 +15,13 @@ Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
*/
package gplx.core.errs; import gplx.*; import gplx.core.*;
public class Err_msg {
private final String msg; private Object[] args;
private final String msg; private Object[] args;
public Err_msg(String type, String msg, Object[] args) {
this.type = type;
this.msg = msg;
this.args = args;
}
public String Type() {return type;} private final String type;
public String Type() {return type;} private final String type;
public void Args_add(Object[] add) {
this.args = (Object[])Array_.Resize_add(args, add);
}

View File

@ -16,7 +16,7 @@ Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
package gplx.core.gfo_ndes; import gplx.*; import gplx.core.*;
import gplx.core.strings.*; import gplx.core.type_xtns.*;
public class GfoFldList_ {
public static final GfoFldList Null = new GfoFldList_null();
public static final GfoFldList Null = new GfoFldList_null();
public static GfoFldList new_() {return new GfoFldList_base();}
public static GfoFldList str_(String... names) {
GfoFldList rv = new GfoFldList_base();

View File

@ -16,7 +16,7 @@ Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
package gplx.core.gfo_ndes; import gplx.*; import gplx.core.*;
import gplx.core.lists.*; /*ComparerAble*/
public class GfoNdeList_ {
public static final GfoNdeList Null = new GfoNdeList_null();
public static final GfoNdeList Null = new GfoNdeList_null();
public static GfoNdeList new_() {return new GfoNdeList_base();}
}
class GfoNdeList_base implements GfoNdeList {

View File

@ -16,7 +16,7 @@ Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
package gplx.core.gfo_ndes; import gplx.*; import gplx.core.*;
import gplx.core.type_xtns.*; import gplx.core.stores.*;
public class GfoNde_ {
public static final GfoNde[] Ary_empty = new GfoNde[0];
public static final GfoNde[] Ary_empty = new GfoNde[0];
public static GfoNde[] ary_(GfoNde... ary) {return ary;}
public static GfoNde as_(Object obj) {return obj instanceof GfoNde ? (GfoNde)obj : null;}
public static GfoNde root_(GfoNde... subs) {return new GfoNde(GfoNde_.Type_Root, "RootName", GfoFldList_.Null, Object_.Ary_empty, GfoFldList_.Null, subs);}
@ -41,5 +41,5 @@ public class GfoNde_ {
}
finally {rdr.Rls();}
}
@gplx.Internal protected static final int Type_Leaf = 1, Type_Node = 2, Type_Root = 3;
@gplx.Internal protected static final int Type_Leaf = 1, Type_Node = 2, Type_Root = 3;
}

View File

@ -82,12 +82,12 @@ public class GfoRegy implements Gfo_invk {
}
else return Gfo_invk_.Rv_unhandled;
return this;
} public static final String Invk_RegDir = "RegDir", Invk_RegObj = "RegObj";
} public static final String Invk_RegDir = "RegDir", Invk_RegObj = "RegObj";
void RegItm(String key, Object val, int valType, Io_url url) {
hash.Add_if_dupe_use_nth(key, new GfoRegyItm(key, val, valType, url));
}
Hash_adp hash = Hash_adp_.New();
public static final String Err_ChopBgn = "chopBgn results in null key", Err_ChopEnd = "chopEnd results in null key", Err_Dupe = "key already registered";
public static final GfoRegy Instance = new GfoRegy(); GfoRegy() {}
public static final String Err_ChopBgn = "chopBgn results in null key", Err_ChopEnd = "chopEnd results in null key", Err_Dupe = "key already registered";
public static final GfoRegy Instance = new GfoRegy(); GfoRegy() {}
@gplx.Internal protected static GfoRegy new_() {return new GfoRegy();}
}

View File

@ -136,7 +136,7 @@ public class Utf8_ {
private static boolean Codepoint_valid(int v) {
return Character.isDefined(v);
}
public static final int
public static final int
Codepoint_max = 0x10FFFF //see http://unicode.org/glossary/
, Codepoint_surrogate_bgn = 0xD800
, Codepoint_surrogate_end = 0xDFFF

View File

@ -15,7 +15,7 @@ Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
*/
package gplx.core.ios; import gplx.*; import gplx.core.*;
public class IoEnginePool {
private final Hash_adp hash = Hash_adp_.New();
private final Hash_adp hash = Hash_adp_.New();
public void Add_if_dupe_use_nth(IoEngine engine) {
hash.Del(engine.Key());
hash.Add(engine.Key(), engine);
@ -24,7 +24,7 @@ public class IoEnginePool {
IoEngine rv = (IoEngine)hash.Get_by(key);
return rv == null ? IoEngine_.Mem : rv; // rv == null when url is null or empty; return Mem which should be a noop; DATE:2013-06-04
}
public static final IoEnginePool Instance = new IoEnginePool();
public static final IoEnginePool Instance = new IoEnginePool();
IoEnginePool() {
this.Add_if_dupe_use_nth(IoEngine_.Sys);
this.Add_if_dupe_use_nth(IoEngine_.Mem);

View File

@ -120,7 +120,7 @@ public class IoEngineUtl {
if (trgStream != null) trgStream.Rls();
}
}
private static final Lru_cache Dir_cache = new Lru_cache(Bool_.Y, "gplx.ios.dir_cache", 128, 256);
private static final Lru_cache Dir_cache = new Lru_cache(Bool_.Y, "gplx.ios.dir_cache", 128, 256);
public static boolean Query_read_only(IoEngine engine, Io_url url, int read_only_type) {
switch (read_only_type) {
case Io_mgr.Read_only__basic__file:

View File

@ -577,7 +577,7 @@ public class IoEngine_system extends IoEngine_base {
}
void MarkFileWritable(File fil, Io_url url, boolean readOnlyFails, String op) {
if (Fil_ReadOnly(fil)) {
if (readOnlyFails) // NOTE: java will always allow final files to be deleted; programmer api is responsible for check
if (readOnlyFails) // NOTE: java will always allow final files to be deleted; programmer api is responsible for check
throw Err_.new_(IoEngineArgs.Instance.Err_ReadonlyFileNotWritable, "writable operation attempted on readOnly file", "op", op, "url", url.Xto_api());
else
Fil_Writable(fil);
@ -599,7 +599,7 @@ class IoEngineArgs {
public String Err_ReadonlyFileNotWritable = "gplx.core.ios.ReadonlyFileNotWritable";
public String Err_FileNotFound = "gplx.core.ios.FileNotFound";
public String Err_IoException = "gplx.core.ios.IoException";
public static final IoEngineArgs Instance = new IoEngineArgs();
public static final IoEngineArgs Instance = new IoEngineArgs();
}
class IoEngine_system_xtn {
// PATCH.DROID:VerifyError if file.setExecutable is referenced directly in IoEngine_system. However, if placed in separate class

View File

@ -26,7 +26,7 @@ public class IoEngine_xrg_downloadFil {
}
public String User_agent() {return user_agent;} public IoEngine_xrg_downloadFil User_agent_(String v) {user_agent = v; return this;} private String user_agent;
public Gfo_usr_dlg Prog_dlg() {return prog_dlg;} public IoEngine_xrg_downloadFil Prog_dlg_(Gfo_usr_dlg v) {prog_dlg = v; download_fmt.Ctor(prog_dlg); return this;} private Gfo_usr_dlg prog_dlg;
public Bry_fmtr Prog_fmtr() {return prog_fmtr;} private final Bry_fmtr prog_fmtr = Bry_fmtr.new_("~{download_header}: ~{download_read} of ~{download_length} kb;", "download_header", "download_url", "download_read", "download_length");
public Bry_fmtr Prog_fmtr() {return prog_fmtr;} private final Bry_fmtr prog_fmtr = Bry_fmtr.new_("~{download_header}: ~{download_read} of ~{download_length} kb;", "download_header", "download_url", "download_read", "download_length");
public String Prog_fmt_hdr() {return prog_fmt_hdr;} public IoEngine_xrg_downloadFil Prog_fmt_hdr_(String v) {prog_fmt_hdr = v; return this;} private String prog_fmt_hdr = ""; // NOTE: must init to "", else null ref when building String
public boolean Prog_cancel() {return prog_cancel;} public IoEngine_xrg_downloadFil Prog_cancel_y_() {prog_cancel = true; return this;} private volatile boolean prog_cancel;
public boolean Prog_running() {return prog_running;} public IoEngine_xrg_downloadFil Prog_running_(boolean v) {prog_running = v; return this;} private boolean prog_running;
@ -34,7 +34,7 @@ public class IoEngine_xrg_downloadFil {
public DateAdp Src_last_modified() {return src_last_modified;} public IoEngine_xrg_downloadFil Src_last_modified_(DateAdp v) {src_last_modified = v; return this;} private DateAdp src_last_modified;
public boolean Src_last_modified_query() {return src_last_modified_query;} public IoEngine_xrg_downloadFil Src_last_modified_query_(boolean v) {src_last_modified_query = v; return this;} private boolean src_last_modified_query;
public String Trg_engine_key() {return trg_engine_key;} public IoEngine_xrg_downloadFil Trg_engine_key_(String v) {trg_engine_key = v; return this;} private String trg_engine_key = IoEngine_.SysKey;
public Io_download_fmt Download_fmt() {return download_fmt;} private final Io_download_fmt download_fmt = new Io_download_fmt();
public Io_download_fmt Download_fmt() {return download_fmt;} private final Io_download_fmt download_fmt = new Io_download_fmt();
public boolean Exec() {return IoEnginePool.Instance.Get_by(trg.Info().EngineKey()).DownloadFil(this);}
public Io_stream_rdr Exec_as_rdr() {return IoEnginePool.Instance.Get_by(IoEngine_.SysKey).DownloadFil_as_rdr(this);}
public boolean Exec_meta_only() {return exec_meta_only;} private boolean exec_meta_only;

View File

@ -19,5 +19,5 @@ public class IoEngine_xrg_fil_affects1_base {
public IoEngine_xrg_fil_affects1_base Url_(Io_url v) {url = v; return this;}
public boolean MissingFails() {return missingFails;} public void MissingFails_set(boolean v) {missingFails = v;} private boolean missingFails = true;
public boolean ReadOnlyFails() {return readOnlyFails;} public void ReadOnlyFails_set(boolean v) {readOnlyFails = v;} private boolean readOnlyFails = true;
@gplx.Virtual public void Exec() {}
public void Exec() {}
}

View File

@ -53,5 +53,5 @@ public class IoEngine_xrg_recycleFil extends IoEngine_xrg_fil_affects1_base {
public static IoEngine_xrg_recycleFil sysm_(Io_url url) {return new IoEngine_xrg_recycleFil(SysmConst);}
public static IoEngine_xrg_recycleFil gplx_(Io_url url) {IoEngine_xrg_recycleFil rv = new IoEngine_xrg_recycleFil(GplxConst); rv.Url_set(url); return rv;}
public static IoEngine_xrg_recycleFil proto_() {return gplx_(Io_url_.Empty);}
public static final int GplxConst = 0, SysmConst = 1;
public static final int GplxConst = 0, SysmConst = 1;
}

View File

@ -16,7 +16,7 @@ Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
package gplx.core.ios; import gplx.*; import gplx.core.*;
import gplx.core.type_xtns.*;
public class IoItmClassXtn extends ClassXtn_base implements ClassXtn {
public String Key() {return Key_const;} public static final String Key_const = "ioItemType";
public String Key() {return Key_const;} public static final String Key_const = "ioItemType";
@Override public Class<?> UnderClass() {return int.class;}
public Object DefaultValue() {return IoItmDir.Type_Dir;}
public boolean Eq(Object lhs, Object rhs) {return ((IoItm_base)lhs).compareTo(rhs) == CompareAble_.Same;}
@ -27,5 +27,5 @@ public class IoItmClassXtn extends ClassXtn_base implements ClassXtn {
else throw Err_.new_unhandled(raw);
}
@Override public Object XtoDb(Object obj) {return Int_.Cast(obj);}
public static final IoItmClassXtn Instance = new IoItmClassXtn(); IoItmClassXtn() {}
public static final IoItmClassXtn Instance = new IoItmClassXtn(); IoItmClassXtn() {}
}

View File

@ -17,7 +17,7 @@ package gplx.core.ios; import gplx.*; import gplx.core.*;
import gplx.core.criterias.*;
public class IoItmDir extends IoItm_base {
public boolean Exists() {return exists;} public void Exists_set(boolean v) {exists = v;} private boolean exists = true;
@Override public int TypeId() {return Type_Dir;} @Override public boolean Type_dir() {return true;} @Override public boolean Type_fil() {return false;} public static final int Type_Dir = 1;
@Override public int TypeId() {return Type_Dir;} @Override public boolean Type_dir() {return true;} @Override public boolean Type_fil() {return false;} public static final int Type_Dir = 1;
public boolean ReadOnly() {return readOnly;} public IoItmDir ReadOnly_(boolean val) {this.readOnly = val; return this;} private boolean readOnly;
@gplx.New public IoItmDir XtnProps_set(String key, Object val) {return (IoItmDir)super.XtnProps_set(key, val);}
public IoItmList SubDirs() {return subDirs;} IoItmList subDirs;

View File

@ -16,7 +16,7 @@ Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
package gplx.core.ios; import gplx.*; import gplx.core.*;
public class IoItmDir_ {
public static IoItmDir as_(Object obj) {return obj instanceof IoItmDir ? (IoItmDir)obj : null;}
public static final IoItmDir Null = null_();
public static final IoItmDir Null = null_();
public static IoItmDir top_(Io_url url) {return scan_(url);}
public static IoItmDir scan_(Io_url url) {
IoItmDir rv = new IoItmDir(url.Info().CaseSensitive());

View File

@ -16,12 +16,12 @@ Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
package gplx.core.ios; import gplx.*; import gplx.core.*;
import gplx.langs.gfs.*;
public class IoItmFil extends IoItm_base {
@Override public int TypeId() {return IoItmFil.Type_Fil;} @Override public boolean Type_dir() {return false;} @Override public boolean Type_fil() {return true;} public static final int Type_Fil = 2;
@Override public int TypeId() {return IoItmFil.Type_Fil;} @Override public boolean Type_dir() {return false;} @Override public boolean Type_fil() {return true;} public static final int Type_Fil = 2;
public boolean Exists() {return size != Size_invalid;} // NOTE: questionable logic, but preserved for historical reasons; requires that length be set to -1 if !.exists
public DateAdp ModifiedTime() {return modifiedTime;}
public IoItmFil ModifiedTime_(DateAdp val) {modifiedTime = val; return this;} DateAdp modifiedTime;
public IoItmFil ModifiedTime_(String val) {return ModifiedTime_(DateAdp_.parse_gplx(val));}
@gplx.Virtual public long Size() {return size;} public IoItmFil Size_(long val) {size = val; return this;} private long size;
public long Size() {return size;} public IoItmFil Size_(long val) {size = val; return this;} private long size;
public IoItmAttrib Attrib() {return attrib;} public IoItmFil Attrib_(IoItmAttrib val) {attrib = val; return this;} IoItmAttrib attrib = IoItmAttrib.normal_();
public boolean ReadOnly() {return attrib.ReadOnly();} public IoItmFil ReadOnly_(boolean val) {attrib.ReadOnly_(val); return this;}
@gplx.New public IoItmFil XtnProps_set(String key, Object val) {return (IoItmFil)super.XtnProps_set(key, val);}

View File

@ -33,5 +33,5 @@ class IoItmFil_mem extends IoItmFil { public static IoItmFil_mem as_(Object obj
rv.stream = IoStream_mem.rdr_txt_(filPath, text);
return rv;
}
public static final IoItmFil_mem Null = new_(Io_url_.Empty, -1, DateAdp_.MinValue, ""); // NOTE: size must be -1 for .Exists to be false; DATE:2015-05-16
public static final IoItmFil_mem Null = new_(Io_url_.Empty, -1, DateAdp_.MinValue, ""); // NOTE: size must be -1 for .Exists to be false; DATE:2015-05-16
}

Some files were not shown because too many files have changed in this diff Show More