1
0
mirror of https://github.com/gnosygnu/xowa.git synced 2026-03-02 03:49:30 +00:00

TemplateStyles: Add templatestyles to html.head [#314]

This commit is contained in:
gnosygnu
2018-12-30 23:25:29 -05:00
parent e65d9268d6
commit cc502c872f
15 changed files with 211 additions and 57 deletions

View File

@@ -0,0 +1,31 @@
/*
XOWA: the XOWA Offline Wiki Application
Copyright (C) 2012-2017 gnosygnu@gmail.com
XOWA is licensed under the terms of the General Public License (GPL) Version 3,
or alternatively under the terms of the Apache License Version 2.0.
You may use XOWA according to either of these licenses as is most appropriate
for your project on a case-by-case basis.
The terms of each license can be found in the source code repository:
GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt
Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
*/
package gplx.xowa.apps.kvs; import gplx.*; import gplx.xowa.*; import gplx.xowa.apps.*;
public class Xoa_kv_hash {
private final Hash_adp hash = Hash_adp_.New();
public Object Get_or_make(Xoa_kv_itm itm) {
String key = itm.Kv__key();
Object val = hash.Get_by(key);
if (val == null) {
val = itm.Kv__val_make();
hash.Add(key, val);
}
return val;
}
public void Clear() {
hash.Clear();
}
}

View File

@@ -0,0 +1,20 @@
/*
XOWA: the XOWA Offline Wiki Application
Copyright (C) 2012-2017 gnosygnu@gmail.com
XOWA is licensed under the terms of the General Public License (GPL) Version 3,
or alternatively under the terms of the Apache License Version 2.0.
You may use XOWA according to either of these licenses as is most appropriate
for your project on a case-by-case basis.
The terms of each license can be found in the source code repository:
GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt
Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
*/
package gplx.xowa.apps.kvs; import gplx.*; import gplx.xowa.*; import gplx.xowa.apps.*;
public interface Xoa_kv_itm {
String Kv__key();
Object Kv__val_make();
}