mirror of
https://github.com/gnosygnu/xowa.git
synced 2026-03-02 03:49:30 +00:00
Wikibase: Add getReferencedEntityId; refactor some wikibase code
This commit is contained in:
@@ -15,8 +15,8 @@ Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
|
||||
*/
|
||||
package gplx.xowa.apps.caches; import gplx.*; import gplx.xowa.*; import gplx.xowa.apps.*;
|
||||
import gplx.xowa.xtns.wbases.*;
|
||||
public class Wdata_doc_cache {
|
||||
private Hash_adp_bry hash = Hash_adp_bry.cs();
|
||||
public class Wbase_doc_cache {
|
||||
private final Hash_adp_bry hash = Hash_adp_bry.cs();
|
||||
public void Add(byte[] qid, Wdata_doc doc) {hash.Add(qid, doc);}
|
||||
public Wdata_doc Get_or_null(byte[] qid) {return (Wdata_doc)hash.Get_by_bry(qid);}
|
||||
public void Free_mem_all() {this.Clear();}
|
||||
@@ -15,7 +15,7 @@ Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
|
||||
*/
|
||||
package gplx.xowa.apps.caches; import gplx.*; import gplx.xowa.*; import gplx.xowa.apps.*;
|
||||
public class Xoa_cache_mgr {
|
||||
public Wdata_doc_cache Doc_cache() {return doc_cache;} private Wdata_doc_cache doc_cache = new Wdata_doc_cache();
|
||||
public Wbase_doc_cache Doc_cache() {return doc_cache;} private Wbase_doc_cache doc_cache = new Wbase_doc_cache();
|
||||
public void Free_mem_all() {
|
||||
doc_cache.Free_mem_all();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user