mirror of
https://github.com/gnosygnu/xowa.git
synced 2026-03-02 03:49:30 +00:00
'v3.3.4.1'
This commit is contained in:
@@ -24,15 +24,15 @@ public class Xol_transform_mgr implements GfoInvkAble {
|
||||
private boolean empty = true;
|
||||
public void Clear() {hash.Clear(); trie_k_to_v.Clear(); trie_v_to_k.Clear(); empty = true;}
|
||||
public int Len() {return hash.Count();}
|
||||
public KeyVal Get_at(int i) {return (KeyVal)hash.Get_at(i);}
|
||||
public Keyval Get_at(int i) {return (Keyval)hash.Get_at(i);}
|
||||
public byte[] Get_val_or_self(byte[] k) { // NOTE: return self; note that MW defaults "." and "," to self, even though MessagesLa.php only specifies ","; i.e.: always return something for "."; DATE:2014-05-13
|
||||
KeyVal kv = (KeyVal)hash.Get_by(k);
|
||||
Keyval kv = (Keyval)hash.Get_by(k);
|
||||
return kv == null ? k : (byte[])kv.Val();
|
||||
}
|
||||
public Xol_transform_mgr Set(byte[] k, byte[] v) {
|
||||
trie_k_to_v.Add(k, v);
|
||||
trie_v_to_k.Add(v, k);
|
||||
KeyVal kv = KeyVal_.new_(String_.new_u8(k), v);
|
||||
Keyval kv = Keyval_.new_(String_.new_u8(k), v);
|
||||
hash.Del(k);
|
||||
hash.Add(k, kv);
|
||||
empty = false;
|
||||
|
||||
Reference in New Issue
Block a user