mirror of
https://github.com/gnosygnu/xowa.git
synced 2026-03-02 03:49:30 +00:00
v2.8.5.1
This commit is contained in:
@@ -31,7 +31,7 @@ public class GfmlLxr_ {
|
||||
public static final GfmlLxr Null = new GfmlLxr_null();
|
||||
public static final String CmdTknChanged_evt = "Changed";
|
||||
public static GfmlLxr as_(Object obj) {return obj instanceof GfmlLxr ? (GfmlLxr)obj : null;}
|
||||
public static GfmlLxr cast_(Object obj) {try {return (GfmlLxr)obj;} catch(Exception exc) {throw Err_.new_type_mismatch_w_exc(exc, GfmlLxr.class, obj);}}
|
||||
public static GfmlLxr cast(Object obj) {try {return (GfmlLxr)obj;} catch(Exception exc) {throw Err_.new_type_mismatch_w_exc(exc, GfmlLxr.class, obj);}}
|
||||
}
|
||||
class GfmlLxr_null implements GfmlLxr {
|
||||
public String Key() {return "gfml.nullLxr";}
|
||||
@@ -85,7 +85,7 @@ class GfmlLxr_group implements GfmlLxr {
|
||||
sb.Add_mid(stream.Ary(), stream.Pos(), hookLength);
|
||||
stream.MoveNextBy(hookLength);
|
||||
|
||||
String found = String_.cast_(trie.FindMatch(stream));
|
||||
String found = String_.cast(trie.FindMatch(stream));
|
||||
if (found == null) break;
|
||||
hookLength = trie.LastMatchCount;
|
||||
}
|
||||
@@ -213,5 +213,5 @@ class GfmlLxr_frame extends GfmlLxr_singleton { GfmlFrame frame; GfmlLxr endLxr
|
||||
return rv;
|
||||
} GfmlLxr_frame() {}
|
||||
public static GfmlLxr_frame as_(Object obj) {return obj instanceof GfmlLxr_frame ? (GfmlLxr_frame)obj : null;}
|
||||
public static GfmlLxr_frame cast_(Object obj) {try {return (GfmlLxr_frame)obj;} catch(Exception exc) {throw Err_.new_type_mismatch_w_exc(exc, GfmlLxr_frame.class, obj);}}
|
||||
public static GfmlLxr_frame cast(Object obj) {try {return (GfmlLxr_frame)obj;} catch(Exception exc) {throw Err_.new_type_mismatch_w_exc(exc, GfmlLxr_frame.class, obj);}}
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ public class GfmlTrie {
|
||||
public String[] Symbols() {
|
||||
String[] rv = new String[symbols.Count()];
|
||||
for (int i = 0; i < rv.length; i++)
|
||||
rv[i] = String_.cast_(symbols.Get_at(i));
|
||||
rv[i] = String_.cast(symbols.Get_at(i));
|
||||
return rv;
|
||||
} Ordered_hash symbols = Ordered_hash_.new_();
|
||||
public int LastMatchCount; // PERF: prop is faster than method
|
||||
|
||||
@@ -17,8 +17,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package gplx.gfml; import gplx.*;
|
||||
public class GfmlDoc_ {
|
||||
public static GfmlDoc parse_any_eol_(String raw) {return parse_(String_.Replace(raw, String_.CrLf, String_.Lf));}
|
||||
public static GfmlDoc parse_(String raw) {
|
||||
public static GfmlDoc parse_any_eol_(String raw) {return parse(String_.Replace(raw, String_.CrLf, String_.Lf));}
|
||||
public static GfmlDoc parse(String raw) {
|
||||
GfmlBldr bldr = GfmlBldr_.default_();
|
||||
return bldr.XtoGfmlDoc(raw);
|
||||
}
|
||||
|
||||
@@ -43,7 +43,7 @@ class GfmlStringHighlighter {
|
||||
if (i == 0) rawBfrBgn = bgnPos;
|
||||
|
||||
// endPos
|
||||
int nxtMarkPos = nxtMark == GfmlStringHighlighterMarker.Null ? Int_.MaxValue : nxtMark.Pos();
|
||||
int nxtMarkPos = nxtMark == GfmlStringHighlighterMarker.Null ? Int_.Max_value : nxtMark.Pos();
|
||||
endPos = curMark.Pos() + excerptLen;
|
||||
if (endPos >= nxtMarkPos) endPos = nxtMarkPos;
|
||||
if (endPos > rawLen ) endPos = rawLen + 1;
|
||||
|
||||
@@ -20,7 +20,7 @@ import gplx.lists.*; /*StackAdp*/
|
||||
public class GfmlDataWtr extends DataWtr_base implements DataWtr {
|
||||
public void InitWtr(String key, Object val) {
|
||||
if (!String_.Eq(key, GfmlDataWtrOpts.Key_const)) return;
|
||||
GfmlDataWtrOpts layout = GfmlDataWtrOpts.cast_(val);
|
||||
GfmlDataWtrOpts layout = GfmlDataWtrOpts.cast(val);
|
||||
keyedSpr = layout.KeyedSpr();
|
||||
indentNodes = layout.IndentNodes();
|
||||
ignoreNullNames = layout.IgnoreNullNames();
|
||||
|
||||
@@ -23,5 +23,5 @@ public class GfmlDataWtrOpts {
|
||||
public boolean IgnoreNullNames() {return ignoreNullNames;} public GfmlDataWtrOpts IgnoreNullNamesOn_() {ignoreNullNames = true; return this;} private boolean ignoreNullNames;
|
||||
public static final GfmlDataWtrOpts _ = new GfmlDataWtrOpts();
|
||||
public static GfmlDataWtrOpts new_() {return new GfmlDataWtrOpts();} GfmlDataWtrOpts() {}
|
||||
public static GfmlDataWtrOpts cast_(Object obj) {try {return (GfmlDataWtrOpts)obj;} catch(Exception exc) {throw Err_.new_type_mismatch_w_exc(exc, GfmlDataWtrOpts.class, obj);}}
|
||||
public static GfmlDataWtrOpts cast(Object obj) {try {return (GfmlDataWtrOpts)obj;} catch(Exception exc) {throw Err_.new_type_mismatch_w_exc(exc, GfmlDataWtrOpts.class, obj);}}
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ public class z901_perf_tst {
|
||||
// sbXml.Add(longText);
|
||||
// sbXml.Add("/>");
|
||||
// tmr.Bgn();
|
||||
// gplx.xmls.XmlDoc_.parse_(sbXml.To_str());
|
||||
// gplx.xmls.XmlDoc_.parse(sbXml.To_str());
|
||||
// tmr.End_and_print("xml"); // 400
|
||||
|
||||
String_bldr sbGfml = String_bldr_.new_();
|
||||
|
||||
Reference in New Issue
Block a user