diff --git a/core/src/love/distributedrebirth/demo4d/base2t/BasePartIdentifier.java b/core/src/love/distributedrebirth/demo4d/base2t/BasePartIdentifier.java index a252ec4b..47428c42 100644 --- a/core/src/love/distributedrebirth/demo4d/base2t/BasePartIdentifier.java +++ b/core/src/love/distributedrebirth/demo4d/base2t/BasePartIdentifier.java @@ -7,7 +7,13 @@ package love.distributedrebirth.demo4d.base2t; */ public interface BasePartIdentifier { + int ordinal(); + String getIdentifierTone(); String getIdentifierLetter(); + + String getChinaKey(); + + String getChinaValue(); } diff --git a/core/src/love/distributedrebirth/demo4d/base2t/T02PartBinary.java b/core/src/love/distributedrebirth/demo4d/base2t/T02PartBinary.java index 4938a491..388dfe98 100644 --- a/core/src/love/distributedrebirth/demo4d/base2t/T02PartBinary.java +++ b/core/src/love/distributedrebirth/demo4d/base2t/T02PartBinary.java @@ -7,26 +7,32 @@ import java.util.function.Consumer; import java.util.stream.Collectors; /** - * + * The distribution by 2. * @author willemtsade ©Δ∞ 仙上主天 * */ public enum T02PartBinary implements BasePartIdentifier { - PART_1("˧","0"), - PART_2("꜔","1"), + PART_1("˧","0", "低", "low"), + PART_2("꜔","1", "高", "high"), ; public static int LENGTH = 2; private final String identifierTone; private final String identifierLetter; + private final String chinaKey; + private final String chinaValue; private static final Map TONE_MAP = Collections.unmodifiableMap( Arrays.asList(values()).stream().collect(Collectors.toMap(v -> v.getIdentifierTone(), v -> v))); + private static final Map CHINA_MAP = Collections.unmodifiableMap( + Arrays.asList(values()).stream().collect(Collectors.toMap(v -> v.getChinaKey(), v -> v))); - private T02PartBinary(String identifierTone, String identifierLetter) { + private T02PartBinary(String identifierTone, String identifierLetter, String chinaKey, String chinaValue) { this.identifierTone = identifierTone; this.identifierLetter = identifierLetter; + this.chinaKey = chinaKey; + this.chinaValue = chinaValue; } @Override @@ -39,6 +45,16 @@ public enum T02PartBinary implements BasePartIdentifier { return identifierLetter; } + @Override + public String getChinaKey() { + return chinaKey; + } + + @Override + public String getChinaValue() { + return chinaValue; + } + public static void forEach(Consumer consumer) { for (T02PartBinary value:values()) { consumer.accept(value); @@ -48,4 +64,8 @@ public enum T02PartBinary implements BasePartIdentifier { public static T02PartBinary valueOfTone(String identifierTone) { return TONE_MAP.get(identifierTone); } + + public static T02PartBinary valueOfChina(String chinaKey) { + return CHINA_MAP.get(chinaKey); + } } diff --git a/core/src/love/distributedrebirth/demo4d/base2t/T03PartTrit.java b/core/src/love/distributedrebirth/demo4d/base2t/T03PartTrit.java index 2850d936..9eced71c 100644 --- a/core/src/love/distributedrebirth/demo4d/base2t/T03PartTrit.java +++ b/core/src/love/distributedrebirth/demo4d/base2t/T03PartTrit.java @@ -7,27 +7,33 @@ import java.util.function.Consumer; import java.util.stream.Collectors; /** - * + * The distribution by 3. * @author willemtsade ©Δ∞ 仙上主天 * */ public enum T03PartTrit implements BasePartIdentifier { - PART_1("˦","0"), - PART_2("˧","1"), - PART_3("˨","2"), + PART_1("˦","0","一","1"), + PART_2("˧","1","二","2"), + PART_3("˨","2","三","3"), ; public static int LENGTH = 3; private final String identifierTone; private final String identifierLetter; + private final String chinaKey; + private final String chinaValue; private static final Map TONE_MAP = Collections.unmodifiableMap( Arrays.asList(values()).stream().collect(Collectors.toMap(v -> v.getIdentifierTone(), v -> v))); + private static final Map CHINA_MAP = Collections.unmodifiableMap( + Arrays.asList(values()).stream().collect(Collectors.toMap(v -> v.getChinaKey(), v -> v))); - private T03PartTrit(String identifierTone, String identifierLetter) { + private T03PartTrit(String identifierTone, String identifierLetter, String chinaKey, String chinaValue) { this.identifierTone = identifierTone; this.identifierLetter = identifierLetter; + this.chinaKey = chinaKey; + this.chinaValue = chinaValue; } @Override @@ -40,6 +46,16 @@ public enum T03PartTrit implements BasePartIdentifier { return identifierLetter; } + @Override + public String getChinaKey() { + return chinaKey; + } + + @Override + public String getChinaValue() { + return chinaValue; + } + public static void forEach(Consumer consumer) { for (T03PartTrit value:values()) { consumer.accept(value); @@ -49,4 +65,8 @@ public enum T03PartTrit implements BasePartIdentifier { public static T03PartTrit valueOfTone(String identifierTone) { return TONE_MAP.get(identifierTone); } + + public static T03PartTrit valueOfChina(String chinaKey) { + return CHINA_MAP.get(chinaKey); + } } diff --git a/core/src/love/distributedrebirth/demo4d/base2t/T04PartQuad.java b/core/src/love/distributedrebirth/demo4d/base2t/T04PartQuad.java index d04e0985..ed8b1c51 100644 --- a/core/src/love/distributedrebirth/demo4d/base2t/T04PartQuad.java +++ b/core/src/love/distributedrebirth/demo4d/base2t/T04PartQuad.java @@ -7,31 +7,37 @@ import java.util.function.Consumer; import java.util.stream.Collectors; /** - * + * The distribution by 4. * @author willemtsade ©Δ∞ 仙上主天 * */ public enum T04PartQuad implements BasePartIdentifierAlt { - PART_1("˥","0","N"), - PART_2("˦","1","E"), - PART_3("˨","2","W"), - PART_4("˩","3","S"), + PART_1("˥","0","北","north","N"), + PART_2("꜒","1","東","east","E"), + PART_3("꜖","2","西","west","W"), + PART_4("˩","3","南","south","S"), ; public static int LENGTH = 4; private final String identifierTone; private final String identifierLetter; + private final String chinaKey; + private final String chinaValue; private final String identifierAlt; private static final Map TONE_MAP = Collections.unmodifiableMap( Arrays.asList(values()).stream().collect(Collectors.toMap(v -> v.getIdentifierTone(), v -> v))); + private static final Map CHINA_MAP = Collections.unmodifiableMap( + Arrays.asList(values()).stream().collect(Collectors.toMap(v -> v.getChinaKey(), v -> v))); private static final BasePartIdentifierAltInfo ALT_INFO = new BasePartIdentifierAltInfo( "Cardinal direction","https://simple.wikipedia.org/wiki/Cardinal_direction"); - private T04PartQuad(String identifierTone, String identifierLetter, String identifierAlt) { + private T04PartQuad(String identifierTone, String identifierLetter, String chinaKey, String chinaValue, String identifierAlt) { this.identifierTone = identifierTone; this.identifierLetter = identifierLetter; + this.chinaKey = chinaKey; + this.chinaValue = chinaValue; this.identifierAlt = identifierAlt; } @@ -45,6 +51,16 @@ public enum T04PartQuad implements BasePartIdentifierAlt { return identifierLetter; } + @Override + public String getChinaKey() { + return chinaKey; + } + + @Override + public String getChinaValue() { + return chinaValue; + } + @Override public String getIdentifierAlt() { return identifierAlt; @@ -68,4 +84,8 @@ public enum T04PartQuad implements BasePartIdentifierAlt { public static T04PartQuad valueOfTone(String identifierTone) { return TONE_MAP.get(identifierTone); } + + public static T04PartQuad valueOfChina(String chinaKey) { + return CHINA_MAP.get(chinaKey); + } } diff --git a/core/src/love/distributedrebirth/demo4d/base2t/T05PartPental.java b/core/src/love/distributedrebirth/demo4d/base2t/T05PartPental.java index 9ce0f862..2d314ecb 100644 --- a/core/src/love/distributedrebirth/demo4d/base2t/T05PartPental.java +++ b/core/src/love/distributedrebirth/demo4d/base2t/T05PartPental.java @@ -7,33 +7,32 @@ import java.util.function.Consumer; import java.util.stream.Collectors; /** - * + * The distribution by 5 called Wuxing. * @author willemtsade ©Δ∞ 仙上主天 - * */ -public enum T05PartPental implements BasePartIdentifierAlt { +public enum T05PartPental implements BasePartIdentifier { - PART_1("˥","0","\u706b"), - PART_2("˦","1","\u571f"), - PART_3("˧","2","\u91d1"), - PART_4("˨","3","\u6c34"), - PART_5("˩","4","\u6728"), + PART_1("˥","0","火","fire"), + PART_2("˦","1","水","water"), + PART_3("˧","2","木","wood"), + PART_4("˨","3","金","gold"), + PART_5("˩","4","土","earth"), ; public static int LENGTH = 5; private final String identifierTone; private final String identifierLetter; - private final String identifierAlt; // FIXME: escaped to keep normal line height in IDE + private final String chinaKey; + private final String chinaValue; private static final Map TONE_MAP = Collections.unmodifiableMap( Arrays.asList(values()).stream().collect(Collectors.toMap(v -> v.getIdentifierTone(), v -> v))); - private static final BasePartIdentifierAltInfo ALT_INFO = new BasePartIdentifierAltInfo( - "Wuxing","https://en.wikipedia.org/wiki/Wuxing_(Chinese_philosophy)"); - private T05PartPental(String identifierTone, String identifierLetter, String identifierAlt) { + private T05PartPental(String identifierTone, String identifierLetter, String chinaKey, String chinaValue) { this.identifierTone = identifierTone; this.identifierLetter = identifierLetter; - this.identifierAlt = identifierAlt; + this.chinaKey = chinaKey; + this.chinaValue = chinaValue; } @Override @@ -47,13 +46,13 @@ public enum T05PartPental implements BasePartIdentifierAlt { } @Override - public String getIdentifierAlt() { - return identifierAlt; + public String getChinaKey() { + return chinaKey; } @Override - public BasePartIdentifierAltInfo getIdentifierAltInfo() { - return ALT_INFO; + public String getChinaValue() { + return chinaValue; } public static void forEach(Consumer consumer) { diff --git a/core/src/love/distributedrebirth/demo4d/base2t/T06PartSeximal.java b/core/src/love/distributedrebirth/demo4d/base2t/T06PartSeximal.java index b60f10e0..cfd0aeca 100644 --- a/core/src/love/distributedrebirth/demo4d/base2t/T06PartSeximal.java +++ b/core/src/love/distributedrebirth/demo4d/base2t/T06PartSeximal.java @@ -7,33 +7,41 @@ import java.util.function.Consumer; import java.util.stream.Collectors; /** + * TThe distribution by 6. + * NOTE: The sexi karlson-speaker is china design 3=6 and 6=9 and in quad space, zero is the result. * * @author willemtsade ©Δ∞ 仙上主天 * */ public enum T06PartSeximal implements BasePartIdentifierAlt { - PART_1("˧˥","0","A"), - PART_2("˧˩","1","D"), - PART_3("˨˦","2","F"), - PART_4("˦˨","3","G"), - PART_5("˩˧","4","V"), - PART_6("˥˧","5","X"), + PART_1("˧˥","0","四","4","A"), + PART_2("˧˩","1","五","5","D"), + PART_3("˨˦","2","六","6","F"), + PART_4("˦˨","3","七","7","G"), + PART_5("˩˧","4","八","8","V"), + PART_6("˥˧","5","九","9","X"), ; public static int LENGTH = 6; private final String identifierTone; private final String identifierLetter; + private final String chinaKey; + private final String chinaValue; private final String identifierAlt; private static final Map TONE_MAP = Collections.unmodifiableMap( Arrays.asList(values()).stream().collect(Collectors.toMap(v -> v.getIdentifierTone(), v -> v))); + private static final Map CHINA_MAP = Collections.unmodifiableMap( + Arrays.asList(values()).stream().collect(Collectors.toMap(v -> v.getChinaKey(), v -> v))); private static final BasePartIdentifierAltInfo ALT_INFO = new BasePartIdentifierAltInfo( "ADFGVX cipher","https://en.wikipedia.org/wiki/ADFGVX_cipher"); - private T06PartSeximal(String identifierTone, String identifierLetter, String identifierAlt) { + private T06PartSeximal(String identifierTone, String identifierLetter, String chinaKey, String chinaValue, String identifierAlt) { this.identifierTone = identifierTone; this.identifierLetter = identifierLetter; + this.chinaKey = chinaKey; + this.chinaValue = chinaValue; this.identifierAlt = identifierAlt; } @@ -47,6 +55,16 @@ public enum T06PartSeximal implements BasePartIdentifierAlt { return identifierLetter; } + @Override + public String getChinaKey() { + return chinaKey; + } + + @Override + public String getChinaValue() { + return chinaValue; + } + @Override public String getIdentifierAlt() { return identifierAlt; @@ -74,4 +92,8 @@ public enum T06PartSeximal implements BasePartIdentifierAlt { public static T06PartSeximal valueOfTone(String identifierTone) { return TONE_MAP.get(identifierTone); } + + public static T06PartSeximal valueOfChina(String chinaKey) { + return CHINA_MAP.get(chinaKey); + } } diff --git a/core/src/love/distributedrebirth/demo4d/base2t/T08PartOctal.java b/core/src/love/distributedrebirth/demo4d/base2t/T08PartOctal.java index 5a045cbd..9268383b 100644 --- a/core/src/love/distributedrebirth/demo4d/base2t/T08PartOctal.java +++ b/core/src/love/distributedrebirth/demo4d/base2t/T08PartOctal.java @@ -7,20 +7,20 @@ import java.util.function.Consumer; import java.util.stream.Collectors; /** - * + * The distribution by 8. * @author willemtsade ©Δ∞ 仙上主天 * */ public enum T08PartOctal implements BasePartIdentifierAlt { - PART_1("˧˥˩","0","˥˩˧", 0), - PART_2("˧˩˥","1","˩˥˧", 3), - PART_3("˧˥˦","2","˥˦˧", 6), - PART_4("˧˩˨","3","˩˨˧", 9), - PART_5("˧˦˦","4","˦˦˧", 12), - PART_6("˧˨˨","5","˨˨˧", 15), - PART_7("˧˥˥","6","˥˥˧", 18), - PART_8("˧˩˩","7","˩˩˧", 21), + PART_1("˧˥˩","0","心","heart","˥˩˧", 0), + PART_2("˧˩˥","1","頭","head","˩˥˧", 3), + PART_3("˧˥˦","2","眼","eye","˥˦˧", 6), + PART_4("˧˩˨","3","嘴","mouth","˩˨˧", 9), + PART_5("˧˦˦","4","臂","arm","˦˦˧", 12), + PART_6("˧˨˨","5","手","hand","˨˨˧", 15), + PART_7("˧˥˥","6","肢","leg","˥˥˧", 18), + PART_8("˧˩˩","7","腳","feet","˩˩˧", 21), ; public static int LENGTH = 8; @@ -28,17 +28,23 @@ public enum T08PartOctal implements BasePartIdentifierAlt { private static final byte BITMASK = 0x07; private final String identifierTone; // absolute private final String identifierLetter; + private final String chinaKey; + private final String chinaValue; private final String identifierAlt; // relative private final int shiftBits; private static final Map TONE_MAP = Collections.unmodifiableMap( Arrays.asList(values()).stream().collect(Collectors.toMap(v -> v.getIdentifierTone(), v -> v))); + private static final Map CHINA_MAP = Collections.unmodifiableMap( + Arrays.asList(values()).stream().collect(Collectors.toMap(v -> v.getChinaKey(), v -> v))); private static final BasePartIdentifierAltInfo ALT_INFO = new BasePartIdentifierAltInfo( "Tone Letters","https://en.wikipedia.org/wiki/Tone_letter"); - private T08PartOctal(String identifierTone, String identifierLetter, String identifierAlt, int shiftBits) { + private T08PartOctal(String identifierTone, String identifierLetter, String chinaKey, String chinaValue, String identifierAlt, int shiftBits) { this.identifierTone = identifierTone; this.identifierLetter = identifierLetter; + this.chinaKey = chinaKey; + this.chinaValue = chinaValue; this.identifierAlt = identifierAlt; this.shiftBits = shiftBits; } @@ -53,6 +59,16 @@ public enum T08PartOctal implements BasePartIdentifierAlt { return identifierLetter; } + @Override + public String getChinaKey() { + return chinaKey; + } + + @Override + public String getChinaValue() { + return chinaValue; + } + @Override public String getIdentifierAlt() { return identifierAlt; @@ -88,4 +104,8 @@ public enum T08PartOctal implements BasePartIdentifierAlt { public static T08PartOctal valueOfTone(String identifierTone) { return TONE_MAP.get(identifierTone); } + + public static T08PartOctal valueOfChina(String chinaKey) { + return CHINA_MAP.get(chinaKey); + } } diff --git a/core/src/love/distributedrebirth/demo4d/base2t/T12PartUncial.java b/core/src/love/distributedrebirth/demo4d/base2t/T12PartUncial.java index 05356cfc..92c669bf 100644 --- a/core/src/love/distributedrebirth/demo4d/base2t/T12PartUncial.java +++ b/core/src/love/distributedrebirth/demo4d/base2t/T12PartUncial.java @@ -7,40 +7,46 @@ import java.util.function.Consumer; import java.util.stream.Collectors; /** - * + * The distribution by 12. * @author willemtsade ©Δ∞ 仙上主天 * */ public enum T12PartUncial implements BasePartIdentifierAlt { // TODO: fixup tone letters for 12 parts - PART_1 ("˥","0","0"), - PART_2 ("˥","1","1"), - PART_3 ("˥","2","2"), - PART_4 ("˥","3","3"), - PART_5 ("˥","4","4"), - PART_6 ("˥","5","5"), - PART_7 ("˥","6","6"), - PART_8 ("˥","7","7"), - PART_9 ("˥","8","8"), - PART_10("˥","9","9"), - PART_11("˥","A","\u218a"), // TURNED DIGIT TWO - PART_12("˥","B","\u218b"), // TURNED DIGIT THREE + PART_1 ("˥","0","日","sun","0"), + PART_2 ("˥","1","月","moon","1"), + PART_3 ("˥","2","星","star","2"), + PART_4 ("˥","3","山","mountain","3"), + PART_5 ("˥","4","龍","dragon","4"), + PART_6 ("˥","5","鳳","phoenix","5"), + PART_7 ("˥","6","杯","cup","6"), + PART_8 ("˥","7","藻","pondweed","7"), + PART_9 ("˥","8","爐","furnace","8"), + PART_10("˥","9","種","seed","9"), + PART_11("˥","A","黼","axe","\u218a"), // TURNED DIGIT TWO + PART_12("˥","B","亞","nozero","\u218b"), // TURNED DIGIT THREE ; public static int LENGTH = 12; private final String identifierTone; private final String identifierLetter; + private final String chinaKey; + private final String chinaValue; private final String identifierAlt; private static final Map TONE_MAP = Collections.unmodifiableMap( Arrays.asList(values()).stream().collect(Collectors.toMap(v -> v.getIdentifierTone(), v -> v))); + private static final Map CHINA_MAP = Collections.unmodifiableMap( + Arrays.asList(values()).stream().collect(Collectors.toMap(v -> v.getChinaKey(), v -> v))); private static final BasePartIdentifierAltInfo ALT_INFO = new BasePartIdentifierAltInfo( "Transdecimal symbols","https://en.wikipedia.org/wiki/Duodecimal#Transdecimal_symbols"); - private T12PartUncial(String identifierTone, String identifierLetter, String identifierAlt) { + private T12PartUncial(String identifierTone, String identifierLetter, String chinaKey, String chinaValue, String identifierAlt) { this.identifierTone = identifierTone; this.identifierLetter = identifierLetter; + this.chinaKey = chinaKey; + this.chinaValue = chinaValue; this.identifierAlt = identifierAlt; } @@ -54,6 +60,16 @@ public enum T12PartUncial implements BasePartIdentifierAlt { return identifierLetter; } + @Override + public String getChinaKey() { + return chinaKey; + } + + @Override + public String getChinaValue() { + return chinaValue; + } + @Override public String getIdentifierAlt() { return identifierAlt; @@ -73,4 +89,8 @@ public enum T12PartUncial implements BasePartIdentifierAlt { public static T12PartUncial valueOfTone(String identifierTone) { return TONE_MAP.get(identifierTone); } + + public static T12PartUncial valueOfChina(String chinaKey) { + return CHINA_MAP.get(chinaKey); + } } diff --git a/core/src/love/distributedrebirth/demo4d/base2t/T16PartHex.java b/core/src/love/distributedrebirth/demo4d/base2t/T16PartHex.java index dd9bc0b1..479f952f 100644 --- a/core/src/love/distributedrebirth/demo4d/base2t/T16PartHex.java +++ b/core/src/love/distributedrebirth/demo4d/base2t/T16PartHex.java @@ -7,43 +7,49 @@ import java.util.function.Consumer; import java.util.stream.Collectors; /** - * + * The distribution by 16. * @author willemtsade ©Δ∞ 仙上主天 * */ public enum T16PartHex implements BasePartIdentifierAlt { - PART_1 ("˧˥˩","0","1"), - PART_2 ("˧˩˥","1","2"), - PART_3 ("˧˥˦","2","3"), - PART_4 ("˧˩˨","3","A"), - PART_5 ("˧˦˦","4","4"), - PART_6 ("˧˨˨","5","5"), - PART_7 ("˧˥˥","6","6"), - PART_8 ("˧˩˩","7","B"), - PART_9 ("˥˩˧","8","7"), - PART_10("˩˥˧","9","8"), - PART_11("˥˦˧","A","9"), - PART_12("˩˨˧","B","C"), - PART_13("˦˦˧","C","*"), - PART_14("˨˨˧","D","0"), - PART_15("˥˥˧","E","#"), - PART_16("˩˩˧","F","D"), + PART_1 ("˧˥˩","0","氫","hydrogen","1"), + PART_2 ("˧˩˥","1","氦","helium","2"), + PART_3 ("˧˥˦","2","鋰","lithium","3"), + PART_4 ("˧˩˨","3","鈹","beryllium","A"), + PART_5 ("˧˦˦","4","硼","boron","4"), + PART_6 ("˧˨˨","5","碳","carbon","5"), + PART_7 ("˧˥˥","6","氮","nitrogen","6"), + PART_8 ("˧˩˩","7","氧","oxygen","B"), + PART_9 ("˥˩˧","8","氟","fluorine","7"), + PART_10("˩˥˧","9","氖","neon","8"), + PART_11("˥˦˧","A","鈉","sodium","9"), + PART_12("˩˨˧","B","鎂","magnesium","C"), + PART_13("˦˦˧","C","鋁","aluminium","*"), + PART_14("˨˨˧","D","矽","silicon","0"), + PART_15("˥˥˧","E","磷","phosphorus","#"), + PART_16("˩˩˧","F","硫","sulfur","D"), ; public static int LENGTH = 16; private final String identifierTone; private final String identifierLetter; + private final String chinaKey; + private final String chinaValue; private final String identifierAlt; private static final Map TONE_MAP = Collections.unmodifiableMap( Arrays.asList(values()).stream().collect(Collectors.toMap(v -> v.getIdentifierTone(), v -> v))); + private static final Map CHINA_MAP = Collections.unmodifiableMap( + Arrays.asList(values()).stream().collect(Collectors.toMap(v -> v.getChinaKey(), v -> v))); private static final BasePartIdentifierAltInfo ALT_INFO = new BasePartIdentifierAltInfo( "Dual-tone multi-frequency signaling","https://en.wikipedia.org/wiki/Dual-tone_multi-frequency_signaling"); - private T16PartHex(String identifierTone, String identifierLetter, String identifierAlt) { + private T16PartHex(String identifierTone, String identifierLetter, String chinaKey, String chinaValue, String identifierAlt) { this.identifierTone = identifierTone; this.identifierLetter = identifierLetter; + this.chinaKey = chinaKey; + this.chinaValue = chinaValue; this.identifierAlt = identifierAlt; } @@ -57,6 +63,16 @@ public enum T16PartHex implements BasePartIdentifierAlt { return identifierLetter; } + @Override + public String getChinaKey() { + return chinaKey; + } + + @Override + public String getChinaValue() { + return chinaValue; + } + @Override public String getIdentifierAlt() { return identifierAlt; @@ -80,4 +96,8 @@ public enum T16PartHex implements BasePartIdentifierAlt { public static T16PartHex valueOfTone(String identifierTone) { return TONE_MAP.get(identifierTone); } + + public static T16PartHex valueOfChina(String chinaKey) { + return CHINA_MAP.get(chinaKey); + } } diff --git a/core/src/love/distributedrebirth/demo4d/base2t/T20PartScore.java b/core/src/love/distributedrebirth/demo4d/base2t/T20PartScore.java index 5b0b3543..f13d202f 100644 --- a/core/src/love/distributedrebirth/demo4d/base2t/T20PartScore.java +++ b/core/src/love/distributedrebirth/demo4d/base2t/T20PartScore.java @@ -7,48 +7,53 @@ import java.util.function.Consumer; import java.util.stream.Collectors; /** - * + * The distribution by 20. * @author willemtsade ©Δ∞ 仙上主天 * */ public enum T20PartScore implements BasePartIdentifierAlt { - // TODO: fixup tone letters for 20 parts - PART_1 ("˥","0","2"), - PART_2 ("˦","1","3"), - PART_3 ("˧","2","4"), - PART_4 ("˨","3","5"), - PART_5 ("˩","4","6"), - PART_6 ("˥","5","7"), - PART_7 ("˥","6","8"), - PART_8 ("˥","7","9"), - PART_9 ("˥","8","C"), - PART_10("˥","9","F"), - PART_11("˥","A","G"), - PART_12("˥","B","H"), - PART_13("˥","C","J"), - PART_14("˥","D","M"), - PART_15("˥","E","P"), - PART_16("˥","F","Q"), - PART_17("˥","G","R"), - PART_18("˥","H","V"), - PART_19("˥","I","W"), - PART_20("˥","J","X"), + PART_1 ("˥","0","尧","yotta","2"), + PART_2 ("˦","1","泽","zetta","3"), + PART_3 ("˧","2","艾","exa","4"), + PART_4 ("˨","3","拍","peta","5"), + PART_5 ("˩","4","太","tera","6"), + PART_6 ("꜒","5","吉","giga","7"), + PART_7 ("꜓","6","兆","mega","8"), + PART_8 ("꜔","7","千","kilo","9"), + PART_9 ("꜕","8","百","hecto","C"), + PART_10("꜖","9","十","deca","F"), + PART_11("꜈","A","分","deci","G"), + PART_12("꜉","B","厘","centi","H"), + PART_13("꜊","C","毫","milli","J"), + PART_14("꜋","D","微","micro","M"), + PART_15("꜌","E","纳","nano","P"), + PART_16("꜍","F","皮","pico","Q"), + PART_17("꜎","G","飞","femto","R"), + PART_18("꜏","H","阿","atto","V"), + PART_19("꜐","I","仄","zepto","W"), + PART_20("꜑","J","幺","yocto","X"), ; public static int LENGTH = 20; private final String identifierTone; private final String identifierLetter; + private final String chinaKey; + private final String chinaValue; private final String identifierAlt; private static final Map TONE_MAP = Collections.unmodifiableMap( Arrays.asList(values()).stream().collect(Collectors.toMap(v -> v.getIdentifierTone(), v -> v))); + private static final Map CHINA_MAP = Collections.unmodifiableMap( + Arrays.asList(values()).stream().collect(Collectors.toMap(v -> v.getChinaKey(), v -> v))); private static final BasePartIdentifierAltInfo ALT_INFO = new BasePartIdentifierAltInfo( "Open Location Code","https://en.wikipedia.org/wiki/Open_Location_Code"); - private T20PartScore(String identifierTone, String identifierLetter, String identifierAlt) { + private T20PartScore(String identifierTone, String identifierLetter, String chinaKey, String chinaValue, String identifierAlt) { this.identifierTone = identifierTone; this.identifierLetter = identifierLetter; + this.chinaKey = chinaKey; + this.chinaValue = chinaValue; this.identifierAlt = identifierAlt; } @@ -62,6 +67,16 @@ public enum T20PartScore implements BasePartIdentifierAlt { return identifierLetter; } + @Override + public String getChinaKey() { + return chinaKey; + } + + @Override + public String getChinaValue() { + return chinaValue; + } + @Override public String getIdentifierAlt() { return identifierAlt; @@ -81,4 +96,8 @@ public enum T20PartScore implements BasePartIdentifierAlt { public static T20PartScore valueOfTone(String identifierTone) { return TONE_MAP.get(identifierTone); } + + public static T20PartScore valueOfChina(String chinaKey) { + return CHINA_MAP.get(chinaKey); + } } diff --git a/core/src/love/distributedrebirth/demo4d/base2t/T60Sexagesimal.java b/core/src/love/distributedrebirth/demo4d/base2t/T60Sexagesimal.java new file mode 100644 index 00000000..3fb9e72b --- /dev/null +++ b/core/src/love/distributedrebirth/demo4d/base2t/T60Sexagesimal.java @@ -0,0 +1,5 @@ +package love.distributedrebirth.demo4d.base2t; + +public enum T60Sexagesimal { + // TODO impl too +} diff --git a/core/src/love/distributedrebirth/demo4d/base2t/V006Tixte.java b/core/src/love/distributedrebirth/demo4d/base2t/V006Tixte.java index 01f21432..1e59cdd9 100644 --- a/core/src/love/distributedrebirth/demo4d/base2t/V006Tixte.java +++ b/core/src/love/distributedrebirth/demo4d/base2t/V006Tixte.java @@ -18,7 +18,7 @@ public final class V006Tixte implements BaseNumber { this(new V003Timble(values), new V003Timble(values)); } - public V006Tixte(V003Timble valueHigh, V003Timble valueLow) { + private V006Tixte(V003Timble valueHigh, V003Timble valueLow) { setValue(T02PartBinary.PART_1, valueHigh); setValue(T02PartBinary.PART_2, valueLow); } diff --git a/core/src/love/distributedrebirth/demo4d/base2t/V009Tyte.java b/core/src/love/distributedrebirth/demo4d/base2t/V009Tyte.java index ffdee0f0..542afced 100644 --- a/core/src/love/distributedrebirth/demo4d/base2t/V009Tyte.java +++ b/core/src/love/distributedrebirth/demo4d/base2t/V009Tyte.java @@ -22,7 +22,7 @@ public final class V009Tyte implements BaseNumberTyte { this(new V003Timble(valueHigh), new V003Timble(valueMedium), new V003Timble(valueLow)); } - public V009Tyte(V003Timble valueHigh, V003Timble valueMedium, V003Timble valueLow) { + private V009Tyte(V003Timble valueHigh, V003Timble valueMedium, V003Timble valueLow) { setValue(T03PartTrit.PART_1, valueHigh); setValue(T03PartTrit.PART_2, valueMedium); setValue(T03PartTrit.PART_3, valueLow); diff --git a/core/src/love/distributedrebirth/demo4d/base2t/V018Tord.java b/core/src/love/distributedrebirth/demo4d/base2t/V018Tord.java index 8f056483..295b11d6 100644 --- a/core/src/love/distributedrebirth/demo4d/base2t/V018Tord.java +++ b/core/src/love/distributedrebirth/demo4d/base2t/V018Tord.java @@ -22,7 +22,7 @@ public final class V018Tord implements BaseNumberTyte { this(values.next(), values.next()); } - public V018Tord(V009Tyte valueHigh, V009Tyte valueLow) { + private V018Tord(V009Tyte valueHigh, V009Tyte valueLow) { setValue(T02PartBinary.PART_1, valueHigh); setValue(T02PartBinary.PART_2, valueLow); } diff --git a/core/src/love/distributedrebirth/demo4d/base2t/V027Temvig.java b/core/src/love/distributedrebirth/demo4d/base2t/V027Temvig.java index eea2e6cb..6537812a 100644 --- a/core/src/love/distributedrebirth/demo4d/base2t/V027Temvig.java +++ b/core/src/love/distributedrebirth/demo4d/base2t/V027Temvig.java @@ -22,7 +22,7 @@ public final class V027Temvig implements BaseNumberTyte { this(values.next(), values.next(), values.next()); } - public V027Temvig(V009Tyte valueHigh, V009Tyte valueMedium, V009Tyte valueLow) { + private V027Temvig(V009Tyte valueHigh, V009Tyte valueMedium, V009Tyte valueLow) { setValue(T03PartTrit.PART_1, valueHigh); setValue(T03PartTrit.PART_2, valueMedium); setValue(T03PartTrit.PART_3, valueLow); diff --git a/core/src/love/distributedrebirth/demo4d/base2t/V036Teger.java b/core/src/love/distributedrebirth/demo4d/base2t/V036Teger.java index cbd0b047..39c47ee2 100644 --- a/core/src/love/distributedrebirth/demo4d/base2t/V036Teger.java +++ b/core/src/love/distributedrebirth/demo4d/base2t/V036Teger.java @@ -22,7 +22,7 @@ public final class V036Teger implements BaseNumberTyte { this(new V018Tord(values), new V018Tord(values)); } - public V036Teger(V018Tord valueHigh, V018Tord valueLow) { + private V036Teger(V018Tord valueHigh, V018Tord valueLow) { setValue(T02PartBinary.PART_1, valueHigh); setValue(T02PartBinary.PART_2, valueLow); } diff --git a/core/src/love/distributedrebirth/demo4d/base2t/V072Tong.java b/core/src/love/distributedrebirth/demo4d/base2t/V072Tong.java index 3fbb2d89..1822a94f 100644 --- a/core/src/love/distributedrebirth/demo4d/base2t/V072Tong.java +++ b/core/src/love/distributedrebirth/demo4d/base2t/V072Tong.java @@ -22,7 +22,7 @@ public final class V072Tong implements BaseNumberTyte { this(new V036Teger(values), new V036Teger(values)); } - public V072Tong(V036Teger valueHigh, V036Teger valueLow) { + private V072Tong(V036Teger valueHigh, V036Teger valueLow) { setValue(T02PartBinary.PART_1, valueHigh); setValue(T02PartBinary.PART_2, valueLow); } diff --git a/core/src/love/distributedrebirth/demo4d/base2t/V144Tocta.java b/core/src/love/distributedrebirth/demo4d/base2t/V144Tocta.java index ecd086fb..780320df 100644 --- a/core/src/love/distributedrebirth/demo4d/base2t/V144Tocta.java +++ b/core/src/love/distributedrebirth/demo4d/base2t/V144Tocta.java @@ -22,7 +22,7 @@ public final class V144Tocta implements BaseNumberTyte { this(new V072Tong(values), new V072Tong(values)); } - public V144Tocta(V072Tong valueHigh, V072Tong valueLow) { + private V144Tocta(V072Tong valueHigh, V072Tong valueLow) { setValue(T02PartBinary.PART_1, valueHigh); setValue(T02PartBinary.PART_2, valueLow); }