Added code points to the number matrix's

This commit is contained in:
Willem Cazander 2022-02-01 13:35:12 +01:00
parent ed938585df
commit 97e5df4279
3 changed files with 64 additions and 36 deletions

View file

@ -7,6 +7,7 @@ import java.util.function.Consumer;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import love.distributedrebirth.numberxd.base2t.facet.BasePart; import love.distributedrebirth.numberxd.base2t.facet.BasePart;
import love.distributedrebirth.numberxd.base2t.facet.BasePartAlt4;
import love.distributedrebirth.numberxd.base2t.facet.BaseFacetKey; import love.distributedrebirth.numberxd.base2t.facet.BaseFacetKey;
import love.distributedrebirth.numberxd.base2t.facet.BaseFacetMap; import love.distributedrebirth.numberxd.base2t.facet.BaseFacetMap;
@ -15,32 +16,53 @@ import love.distributedrebirth.numberxd.base2t.facet.BaseFacetMap;
* *
* @author willemtsade ©Δ 仙上主天 * @author willemtsade ©Δ 仙上主天
*/ */
public enum T10PartDecimal implements BasePart { public enum T10PartDecimal implements BasePart,BasePartAlt4 {
PART_1 ("˥","0","","zero"), PART_1 ("˥","ō","","zero", "", "\u1040","", ""),
PART_2 ("˦","1","","one"), PART_2 ("˦","α","","one", "","\u1041","", ""),
PART_3 ("˧","2","","two"), PART_3 ("˧","β","","two", "","\u1042","",""),
PART_4 ("˨","3","","three"), PART_4 ("˨","γ","","three","","\u1043","",""),
PART_5 ("˩","4","","four"), PART_5 ("˩","δ","","four", "","\u1044","",""),
PART_6 ("","5","","five"), PART_6 ("","ε","","five", "","\u1045","",""),
PART_7 ("","6","","six"), PART_7 ("","ϝ","","six", "","\u1046","",""),
PART_8 ("","7","","seven"), PART_8 ("","ζ","","seven","","\u1047","",""),
PART_9 ("","8","","eight"), PART_9 ("","η","","eight","","\u1048","",""),
PART_10("","9","","nine"), PART_10("","θ","","nine", "","\u1049","",""),
; ;
public static int LENGTH() { return values().length; }; public static int LENGTH() { return values().length; };
private final BaseFacetMap bfm = BaseFacetMap.newInstance(); private final BaseFacetMap bfm = BaseFacetMap.newInstance();
private static final String ALT_1_NAME = "Korean numerals";
private static final String ALT_1_WIKI = "https://en.wikipedia.org/wiki/Korean_numerals";
private static final String ALT_2_NAME = "Burmese numerals"; // Escaped to keep stable line height
private static final String ALT_2_WIKI = "https://en.wikipedia.org/wiki/Burmese_numerals";
private static final String ALT_3_NAME = "Bengali numerals";
private static final String ALT_3_WIKI = "https://en.wikipedia.org/wiki/Bengali_numerals";
private static final String ALT_4_NAME = "Sinhala Lith Illakkam";
private static final String ALT_4_WIKI = "https://en.wikipedia.org/wiki/Sinhala_numerals#Numerals";
private static final Map<String, T10PartDecimal> TONE_MAP = Collections.unmodifiableMap( private static final Map<String, T10PartDecimal> TONE_MAP = Collections.unmodifiableMap(
Arrays.asList(values()).stream().collect(Collectors.toMap(v -> v.getIdentifierTone(), v -> v))); Arrays.asList(values()).stream().collect(Collectors.toMap(v -> v.getIdentifierTone(), v -> v)));
private static final Map<String, T10PartDecimal> CHINA_MAP = Collections.unmodifiableMap( private static final Map<String, T10PartDecimal> CHINA_MAP = Collections.unmodifiableMap(
Arrays.asList(values()).stream().collect(Collectors.toMap(v -> v.getChinaKey(), v -> v))); Arrays.asList(values()).stream().collect(Collectors.toMap(v -> v.getChinaKey(), v -> v)));
private T10PartDecimal(String idTone, String idLetter, String chinaKey, String chinaValue) { private T10PartDecimal(String idTone, String idLetter, String chinaKey, String chinaValue,
String alt1Value, String alt2Value, String alt3Value, String alt4Value) {
this.getBFM().putInit(BaseFacetKey.ID_TONE, idTone); this.getBFM().putInit(BaseFacetKey.ID_TONE, idTone);
this.getBFM().putInit(BaseFacetKey.ID_LETTER, idLetter); this.getBFM().putInit(BaseFacetKey.ID_LETTER, idLetter);
this.getBFM().putInit(BaseFacetKey.CHINA_KEY, chinaKey); this.getBFM().putInit(BaseFacetKey.CHINA_KEY, chinaKey);
this.getBFM().putInit(BaseFacetKey.CHINA_VALUE, chinaValue); this.getBFM().putInit(BaseFacetKey.CHINA_VALUE, chinaValue);
this.getBFM().putInit(BaseFacetKey.ALT_1_VALUE, alt1Value);
this.getBFM().putInit(BaseFacetKey.ALT_1_NAME, ALT_1_NAME);
this.getBFM().putInit(BaseFacetKey.ALT_1_WIKI, ALT_1_WIKI);
this.getBFM().putInit(BaseFacetKey.ALT_2_VALUE, alt2Value);
this.getBFM().putInit(BaseFacetKey.ALT_2_NAME, ALT_2_NAME);
this.getBFM().putInit(BaseFacetKey.ALT_2_WIKI, ALT_2_WIKI);
this.getBFM().putInit(BaseFacetKey.ALT_3_VALUE, alt3Value);
this.getBFM().putInit(BaseFacetKey.ALT_3_NAME, ALT_3_NAME);
this.getBFM().putInit(BaseFacetKey.ALT_3_WIKI, ALT_3_WIKI);
this.getBFM().putInit(BaseFacetKey.ALT_4_VALUE, alt4Value);
this.getBFM().putInit(BaseFacetKey.ALT_4_NAME, ALT_4_NAME);
this.getBFM().putInit(BaseFacetKey.ALT_4_WIKI, ALT_4_WIKI);
} }
@Override @Override

View file

@ -7,6 +7,7 @@ import java.util.function.Consumer;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import love.distributedrebirth.numberxd.base2t.facet.BasePart; import love.distributedrebirth.numberxd.base2t.facet.BasePart;
import love.distributedrebirth.numberxd.base2t.facet.BasePartAlt1;
import love.distributedrebirth.numberxd.base2t.facet.BaseFacetKey; import love.distributedrebirth.numberxd.base2t.facet.BaseFacetKey;
import love.distributedrebirth.numberxd.base2t.facet.BaseFacetMap; import love.distributedrebirth.numberxd.base2t.facet.BaseFacetMap;
@ -15,33 +16,38 @@ import love.distributedrebirth.numberxd.base2t.facet.BaseFacetMap;
* *
* @author willemtsade ©Δ 仙上主天 * @author willemtsade ©Δ 仙上主天
*/ */
public enum T11PartUndecimal implements BasePart { public enum T11PartUndecimal implements BasePart,BasePartAlt1 {
PART_1 ("˥","0","","walk"), PART_1 ("˥","0","","walk", ""),
PART_2 ("","1","","run"), PART_2 ("","1","","run", ""),
PART_3 ("","2","","sit"), PART_3 ("","2","","sit", ""),
PART_4 ("","3","","hang"), PART_4 ("","3","","hang", ""),
PART_5 ("","4","","lay"), PART_5 ("","4","","lay", ""),
PART_6 ("","5","","jump"), PART_6 ("","5","","jump", ""),
PART_7 ("","6","","drop"), PART_7 ("","6","","drop", ""),
PART_8 ("","7","","lonely"), PART_8 ("","7","","lonely",""),
PART_9 ("","8","","talk"), PART_9 ("","8","","talk", ""),
PART_10("","9","","life"), PART_10("","9","","life", ""),
PART_11("˩","=","","mate"), PART_11("˩","=","","mate", ""),
; ;
public static int LENGTH() { return values().length; }; public static int LENGTH() { return values().length; };
private final BaseFacetMap bfm = BaseFacetMap.newInstance(); private final BaseFacetMap bfm = BaseFacetMap.newInstance();
private static final String ALT_1_NAME = "Tamil numerals";
private static final String ALT_1_WIKI = "https://en.wikipedia.org/wiki/Tamil_numerals";
private static final Map<String, T11PartUndecimal> TONE_MAP = Collections.unmodifiableMap( private static final Map<String, T11PartUndecimal> TONE_MAP = Collections.unmodifiableMap(
Arrays.asList(values()).stream().collect(Collectors.toMap(v -> v.getIdentifierTone(), v -> v))); Arrays.asList(values()).stream().collect(Collectors.toMap(v -> v.getIdentifierTone(), v -> v)));
private static final Map<String, T11PartUndecimal> CHINA_MAP = Collections.unmodifiableMap( private static final Map<String, T11PartUndecimal> CHINA_MAP = Collections.unmodifiableMap(
Arrays.asList(values()).stream().collect(Collectors.toMap(v -> v.getChinaKey(), v -> v))); Arrays.asList(values()).stream().collect(Collectors.toMap(v -> v.getChinaKey(), v -> v)));
private T11PartUndecimal(String idTone, String idLetter, String chinaKey, String chinaValue) { private T11PartUndecimal(String idTone, String idLetter, String chinaKey, String chinaValue, String alt1Value) {
this.getBFM().putInit(BaseFacetKey.ID_TONE, idTone); this.getBFM().putInit(BaseFacetKey.ID_TONE, idTone);
this.getBFM().putInit(BaseFacetKey.ID_LETTER, idLetter); this.getBFM().putInit(BaseFacetKey.ID_LETTER, idLetter);
this.getBFM().putInit(BaseFacetKey.CHINA_KEY, chinaKey); this.getBFM().putInit(BaseFacetKey.CHINA_KEY, chinaKey);
this.getBFM().putInit(BaseFacetKey.CHINA_VALUE, chinaValue); this.getBFM().putInit(BaseFacetKey.CHINA_VALUE, chinaValue);
this.getBFM().putInit(BaseFacetKey.ALT_1_VALUE, alt1Value);
this.getBFM().putInit(BaseFacetKey.ALT_1_NAME, ALT_1_NAME);
this.getBFM().putInit(BaseFacetKey.ALT_1_WIKI, ALT_1_WIKI);
} }
@Override @Override