From 7971f71dc3124b751c1baa8aee78402ecd3cbaac Mon Sep 17 00:00:00 2001 From: gnosygnu Date: Tue, 15 Oct 2019 05:15:50 -0400 Subject: [PATCH] Category: Add basic enums for 'numeric' and 'identity' [#601] --- .../addons/wikis/ctgs/enums/Xoctg_collation_enum.java | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/400_xowa/src/gplx/xowa/addons/wikis/ctgs/enums/Xoctg_collation_enum.java b/400_xowa/src/gplx/xowa/addons/wikis/ctgs/enums/Xoctg_collation_enum.java index 17ce02215..3dc5125b1 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/ctgs/enums/Xoctg_collation_enum.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/ctgs/enums/Xoctg_collation_enum.java @@ -15,15 +15,18 @@ Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt */ package gplx.xowa.addons.wikis.ctgs.enums; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.ctgs.*; import gplx.core.btries.*; -public class Xoctg_collation_enum { +public class Xoctg_collation_enum { // REF:https://www.mediawiki.org/wiki/Manual:$wgCategoryCollation private final Btrie_rv trv = new Btrie_rv(); private final Btrie_slim_mgr trie = Btrie_slim_mgr.cs() - .Add_str_byte("uppercase" , Tid__uppercase) - .Add_str_byte("uca" , Tid__uca); + .Add_str_byte("uppercase" , Tid__uppercase) + .Add_str_byte("uca" , Tid__uca) + .Add_str_byte("numeric" , Tid__numeric) // NOTE: no logic implemented for numeric; DATE:2019-10-15 + .Add_str_byte("identity" , Tid__identity) // NOTE: no logic implemented for identity; DATE:2019-10-15 + ; public byte To_tid_or_fail(byte[] raw) { byte tid = trie.Match_byte_or(trv, raw, 0, raw.length, Byte_.Max_value_127); if (tid == Byte_.Max_value_127) throw Err_.new_unhandled_default(raw); return tid; } - public static final byte Tid__uppercase = 1, Tid__uca = 3; + public static final byte Tid__uppercase = 1, Tid__uca = 3, Tid__numeric = 4, Tid__identity = 5; }