1
0
mirror of https://github.com/gnosygnu/xowa.git synced 2026-03-02 03:49:30 +00:00
This commit is contained in:
gnosygnu
2015-08-17 02:09:16 -04:00
parent 34c34f227c
commit df10db140c
421 changed files with 4867 additions and 2429 deletions

View File

@@ -25,7 +25,7 @@ public class GfmlAtr implements GfmlItm {
public int SubObjs_Count() {return subObjs.Count();}
public GfmlObj SubObjs_GetAt(int i) {return (GfmlObj)subObjs.Get_at(i);} GfmlObjList subObjs = GfmlObjList.new_(); // PERF?: make capacity 3 instead of 8
public void SubObjs_Add(GfmlObj o) {subObjs.Add(o);}
public String XtoStr() {return String_.Concat(this.Key(), "=", this.DatTkn().Val());}
public String To_str() {return String_.Concat(this.Key(), "=", this.DatTkn().Val());}
@gplx.Internal protected void Key_set(String v) {keyTkn = GfmlTkn_.val_(v);} // used for 1 test
public static GfmlAtr as_(Object obj) {return obj instanceof GfmlAtr ? (GfmlAtr)obj : null;}

View File

@@ -52,7 +52,7 @@ public class GfmlDocPos implements CompareAble {
int newIdx = ary[oldLen - 1];
return new GfmlDocPos(newAry, newIdx);
}
@Override public String toString() {return path;} public String XtoStr() {return path;}
@Override public String toString() {return path;} public String To_str() {return path;}
void MakePath() {
String_bldr sb = String_bldr_.new_();
for (int i = 0; i < ary.length; i++) {
@@ -60,7 +60,7 @@ public class GfmlDocPos implements CompareAble {
sb.Add("_");
}
sb.Add(idx);
path = sb.XtoStr();
path = sb.To_str();
}
int[] ary; int idx;
@gplx.Internal protected GfmlDocPos(int[] ary, int idx) {this.ary = ary; this.idx = idx;}

View File

@@ -39,7 +39,7 @@ class GfmlUsrMsgs {
Err rv = Err_.new_wo_type("gfml parse error");
for (int i = 0; i < bldr.Doc().UsrMsgs().Count(); i++) {
UsrMsg um = (UsrMsg)bldr.Doc().UsrMsgs().Get_at(i);
rv.Args_add("err" + Int_.Xto_str(i), um.XtoStr());
rv.Args_add("err" + Int_.Xto_str(i), um.To_str());
}
return rv;
}

View File

@@ -16,7 +16,7 @@ You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package gplx.gfml; import gplx.*;
public interface GfmlItm extends GfmlObj, XtoStrAble {
public interface GfmlItm extends GfmlObj, To_str_able {
GfmlTkn KeyTkn(); String Key(); // Key() is alternative to Key().Val()
GfmlType Type();
boolean KeyedSubObj();

View File

@@ -40,7 +40,7 @@ public class GfmlNde implements GfmlItm {
public GfmlDocPos DocPos() {return docPos;} GfmlDocPos docPos = GfmlDocPos_.Null;
public GfmlItmKeys SubKeys() {return subKeys;} GfmlItmKeys subKeys = GfmlItmKeys.new_();
public GfmlItmHnds SubHnds() {return subHnds;} GfmlItmHnds subHnds = GfmlItmHnds.new_();
public String XtoStr() {return GfmlDocWtr_.xtoStr_(this);}
public String To_str() {return GfmlDocWtr_.xtoStr_(this);}
public void UpdateNde(String hnd) {
for (int i = 0; i < subHnds.Count(); i++) {
GfmlNde nde = (GfmlNde)subHnds.Get_at(i);