From 30287a48b7c1533a1c45fecd965a20cc967144d8 Mon Sep 17 00:00:00 2001 From: Willem Cazander Date: Thu, 3 Feb 2022 00:28:30 +0100 Subject: [PATCH] Added BaseGlyphSet to part --- .../demo4d/screen/BasePartRenderer.java | 32 +++-- .../numberxd/base2t/glyph/BaseGlyphSet.java | 50 ++++---- .../base2t/glyph/BaseGlyphSetNumber.java | 13 ++ ...ecimals.java => BaseGlyphSetNumber10.java} | 9 +- ...eximals.java => BaseGlyphSetNumber16.java} | 51 ++++---- ...ematria.java => BaseGlyphSetNumber36.java} | 118 +++++++++++++++++- .../base2t/glyph/BaseGlyphSetNumberType.java | 10 ++ .../glyph/BãßBȍőnGlyphSetNumberInfoʸᴰ.java | 16 +++ .../base2t/glyph/BãßBȍőnGlyphSetʸᴰ.java | 12 +- .../numberxd/base2t/part/BãßBȍőnPartʸᴰ.java | 78 +++++++++++- .../numberxd/base2t/T16PartHexTest.java | 3 - 11 files changed, 315 insertions(+), 77 deletions(-) create mode 100644 numberxd/src/main/love/distributedrebirth/numberxd/base2t/glyph/BaseGlyphSetNumber.java rename numberxd/src/main/love/distributedrebirth/numberxd/base2t/glyph/{BaseGlyphSetDecimals.java => BaseGlyphSetNumber10.java} (87%) rename numberxd/src/main/love/distributedrebirth/numberxd/base2t/glyph/{BaseGlyphSetHeximals.java => BaseGlyphSetNumber16.java} (87%) rename numberxd/src/main/love/distributedrebirth/numberxd/base2t/glyph/{BaseGlyphSetGematria.java => BaseGlyphSetNumber36.java} (64%) create mode 100644 numberxd/src/main/love/distributedrebirth/numberxd/base2t/glyph/BaseGlyphSetNumberType.java create mode 100644 numberxd/src/main/love/distributedrebirth/numberxd/base2t/glyph/BãßBȍőnGlyphSetNumberInfoʸᴰ.java diff --git a/core/src/love/distributedrebirth/demo4d/screen/BasePartRenderer.java b/core/src/love/distributedrebirth/demo4d/screen/BasePartRenderer.java index cb482c77..4c3f8b3b 100644 --- a/core/src/love/distributedrebirth/demo4d/screen/BasePartRenderer.java +++ b/core/src/love/distributedrebirth/demo4d/screen/BasePartRenderer.java @@ -53,11 +53,17 @@ public class BasePartRenderer extends ImGuiRendererMain { ImGui.combo("Type", selectedBasePart, items); int flags = ImGuiTableFlags.ScrollX | ImGuiTableFlags.RowBg | ImGuiTableFlags.BordersOuter | ImGuiTableFlags.BordersV; - ImGui.beginTable("base-part", 10, flags); - ImGui.tableSetupColumn("Name"); - ImGui.tableSetupColumn("Ordinal"); + ImGui.beginTable("base-part", 16, flags); + ImGui.tableSetupColumn("BȍőnNaam"); + ImGui.tableSetupColumn("TelNul"); + ImGui.tableSetupColumn("TelEen"); ImGui.tableSetupColumn("Tone"); - ImGui.tableSetupColumn("Letter"); + ImGui.tableSetupColumn("16LBasic"); + ImGui.tableSetupColumn("16Greek"); + ImGui.tableSetupColumn("16Korean"); + ImGui.tableSetupColumn("36LBasic"); + ImGui.tableSetupColumn("36Greek"); + ImGui.tableSetupColumn("36Arabic"); ImGui.tableSetupColumn("ChinaK"); ImGui.tableSetupColumn("ChinaV"); ImGui.tableSetupColumn("Alt1"); @@ -69,13 +75,25 @@ public class BasePartRenderer extends ImGuiRendererMain { for (BãßBȍőnPartʸᴰ part:baseParts) { ImGui.tableNextRow(); ImGui.tableNextColumn(); - ImGui.text(part.name()); + ImGui.text(part.BȍőnNaam()); ImGui.tableNextColumn(); - ImGui.text(Integer.toString(part.ordinal())); + ImGui.text(Integer.toString(part.BȍőnRangTelNul())); + ImGui.tableNextColumn(); + ImGui.text(Integer.toString(part.BȍőnRangTelEen())); ImGui.tableNextColumn(); ImGui.text(part.BȍőnIdentifierTone()); ImGui.tableNextColumn(); - ImGui.text(part.BȍőnIdentifierLetter()); + ImGui.text(part.BȍőnGlyphSetNumber16LatinBasic()); + ImGui.tableNextColumn(); + ImGui.text(part.BȍőnGlyphSetNumber16Greek()); + ImGui.tableNextColumn(); + ImGui.text(part.BȍőnGlyphSetNumber16Korean()); + ImGui.tableNextColumn(); + ImGui.text(part.BȍőnGlyphSetNumber36LatinBasic()); + ImGui.tableNextColumn(); + ImGui.text(part.BȍőnGlyphSetNumber36Greek()); + ImGui.tableNextColumn(); + ImGui.text(part.BȍőnGlyphSetNumber36Arabic()); ImGui.tableNextColumn(); ImGui.text(part.BȍőnChinaKey()); ImGui.tableNextColumn(); diff --git a/numberxd/src/main/love/distributedrebirth/numberxd/base2t/glyph/BaseGlyphSet.java b/numberxd/src/main/love/distributedrebirth/numberxd/base2t/glyph/BaseGlyphSet.java index d215c673..c4dbc937 100644 --- a/numberxd/src/main/love/distributedrebirth/numberxd/base2t/glyph/BaseGlyphSet.java +++ b/numberxd/src/main/love/distributedrebirth/numberxd/base2t/glyph/BaseGlyphSet.java @@ -9,53 +9,53 @@ import love.distributedrebirth.bassboonyd.BãßBȍőnCoffinʸᴰ; @BãßBȍőnClassInfoʸᴰ(name = "BaseScript", purpose = "The encoded base scripts.") public enum BaseGlyphSet implements BãßBȍőnGlyphSetʸᴰ { - BURMESE(new BaseGlyphSetDecimals("\u1040","\u1041","\u1042","\u1043","\u1044","\u1045","\u1046","\u1047","\u1048","\u1049")), - BENGALI(new BaseGlyphSetDecimals("০","১","২","৩","৪","৫","৬","৭","৮","৯")), - SINHALA(new BaseGlyphSetDecimals("෦","෧","෨","෩","෪","෫","෬","෭","෮","෯")), + BURMESE(new BaseGlyphSetNumber10("\u1040","\u1041","\u1042","\u1043","\u1044","\u1045","\u1046","\u1047","\u1048","\u1049")), + BENGALI(new BaseGlyphSetNumber10("০","১","২","৩","৪","৫","৬","৭","৮","৯")), + SINHALA(new BaseGlyphSetNumber10("෦","෧","෨","෩","෪","෫","෬","෭","෮","෯")), - GREEK(new BaseGlyphSetDecimals("ō","α","β","γ","δ","ε","ϝ","ζ","η","θ"), - new BaseGlyphSetHeximals("ō","α","β","γ","δ","ε","ϝ","ζ","η","θ","ι","κ","λ","μ","ν","ξ"), - new BaseGlyphSetGematria("α","β","γ","δ","ε","ϝ","ζ","η","θ","ι","κ","λ","μ","ν","ξ","ο","π","ϟ","ρ","σ","τ","υ","φ","χ","ψ","ω","ϡ")), + GREEK(new BaseGlyphSetNumber10("ō","α","β","γ","δ","ε","ϝ","ζ","η","θ"), + new BaseGlyphSetNumber16("ō","α","β","γ","δ","ε","ϝ","ζ","η","θ","ι","κ","λ","μ","ν","ξ"), + new BaseGlyphSetNumber36("α","β","γ","δ","ε","ϝ","ζ","η","θ","ι","κ","λ","μ","ν","ξ","ο","π","ϟ","ρ","σ","τ","υ","φ","χ","ψ","ω","ϡ")), - LATIN_BASIC(new BaseGlyphSetDecimals("0","1","2","3","4","5","6","7","8","9"), - new BaseGlyphSetHeximals("0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F"), - new BaseGlyphSetGematria("1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R")), - LATIN_DTMF(new BaseGlyphSetDecimals("zero","one","two","three","four","five","six","seven","eight","nine"), - new BaseGlyphSetHeximals("1","2","3","A","4","5","6","B","7","8","9","C","*","0","#","D")), - LATIN_SUPER(new BaseGlyphSetDecimals("⁰","¹","²","³","⁴","⁵","⁶","⁷","⁸","⁹"), - new BaseGlyphSetHeximals("⁰","¹","²","³","⁴","⁵","⁶","⁷","⁸","⁹","ᵃ","ᵇ","ᶜ","ᵈ","ᵉ","ᶠ")), - LATIN_SUB(new BaseGlyphSetDecimals("₀","₁","₂","₃","₄","₅","₆","₇","₈","₉"), - new BaseGlyphSetHeximals("₀","₁","₂","₃","₄","₅","₆","₇","₈","₉","ₐ","₆","꜀","ₔ","ₑ","բ")), + LATIN_BASIC(new BaseGlyphSetNumber10("0","1","2","3","4","5","6","7","8","9"), + new BaseGlyphSetNumber16("0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F"), + new BaseGlyphSetNumber36("1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R")), + LATIN_DTMF(new BaseGlyphSetNumber10("zero","one","two","three","four","five","six","seven","eight","nine"), + new BaseGlyphSetNumber16("1","2","3","A","4","5","6","B","7","8","9","C","*","0","#","D")), + LATIN_SUPER(new BaseGlyphSetNumber10("⁰","¹","²","³","⁴","⁵","⁶","⁷","⁸","⁹"), + new BaseGlyphSetNumber16("⁰","¹","²","³","⁴","⁵","⁶","⁷","⁸","⁹","ᵃ","ᵇ","ᶜ","ᵈ","ᵉ","ᶠ")), + LATIN_SUB(new BaseGlyphSetNumber10("₀","₁","₂","₃","₄","₅","₆","₇","₈","₉"), + new BaseGlyphSetNumber16("₀","₁","₂","₃","₄","₅","₆","₇","₈","₉","ₐ","₆","꜀","ₔ","ₑ","բ")), - KOREAN(new BaseGlyphSetDecimals("영","일","이","삼","사","오","육","칠","팔","구"), - new BaseGlyphSetHeximals("ㅏ","ㅐ","ㅑ","ㅒ","ㅓ","ㅔ","ㅕ","ㅖ","ㅗ","ㅘ","ㅙ","ㅚ","ㅛ","ㅜ","ㅝ","ㅞ")), + KOREAN(new BaseGlyphSetNumber10("영","일","이","삼","사","오","육","칠","팔","구"), + new BaseGlyphSetNumber16("ㅏ","ㅐ","ㅑ","ㅒ","ㅓ","ㅔ","ㅕ","ㅖ","ㅗ","ㅘ","ㅙ","ㅚ","ㅛ","ㅜ","ㅝ","ㅞ")), - HEBREW(new BaseGlyphSetDecimals("אֶפֶס","אֶחָד","שְׁתַּיִם","שְׁלֹשָׁה","אַרְבַּע‎","חֲמִשָּׁה‎","שֵׁשׁ‎","שִׁבְעָה","שְׁמוֹנֶה","תִּשְׁעָה‎"), - new BaseGlyphSetGematria("א","ב","ג","ד","ה","ו","ז","ח","ט","י","כ","ל","מ","נ","ס ","ע","פ","צ","ק","ר","ש","ת","ך","ם","ן","ף","ץ")), + HEBREW(new BaseGlyphSetNumber10("אֶפֶס","אֶחָד","שְׁתַּיִם","שְׁלֹשָׁה","אַרְבַּע‎","חֲמִשָּׁה‎","שֵׁשׁ‎","שִׁבְעָה","שְׁמוֹנֶה","תִּשְׁעָה‎"), + new BaseGlyphSetNumber36("א","ב","ג","ד","ה","ו","ז","ח","ט","י","כ","ל","מ","נ","ס ","ע","פ","צ","ק","ר","ש","ת","ך","ם","ן","ף","ץ")), - ARABIC(new BaseGlyphSetDecimals("٠","١","٢","٣","٤","٥","٦","٧","٨","٩"), - new BaseGlyphSetGematria("ا","ب","ج","د","ه","و","ز","ح","ط","ي","ك","ل","م","ن","س","ع","ف","ص","ق","ر","ش","ت","ث","خ","ذ","ض","ظ")), + ARABIC(new BaseGlyphSetNumber10("٠","١","٢","٣","٤","٥","٦","٧","٨","٩"), + new BaseGlyphSetNumber36("ا","ب","ج","د","ه","و","ز","ح","ط","ي","ك","ل","م","ن","س","ع","ف","ص","ق","ر","ش","ت","ث","خ","ذ","ض","ظ")), ; private final BãßBȍőnCoffinOpenʸᴰ BBC = BãßBȍőnCoffinOpenʸᴰ.newInstance(); public BãßBȍőnCoffinʸᴰ GET_BBC() { return BBC; } public static int LENGTH() { return values().length; }; - private BaseGlyphSet(BaseGlyphSetDecimals numbers) { + private BaseGlyphSet(BaseGlyphSetNumber10 numbers) { BBC.PUT_OBJ(BãßBȍőnGlyphSetKeyʸᴰ.NUMBERS, numbers); } - private BaseGlyphSet(BaseGlyphSetDecimals numbers, BaseGlyphSetGematria gematria) { + private BaseGlyphSet(BaseGlyphSetNumber10 numbers, BaseGlyphSetNumber36 gematria) { BBC.PUT_OBJ(BãßBȍőnGlyphSetKeyʸᴰ.NUMBERS, numbers); BBC.PUT_OBJ(BãßBȍőnGlyphSetKeyʸᴰ.GEMATRIA, gematria); } - private BaseGlyphSet(BaseGlyphSetDecimals numbers, BaseGlyphSetHeximals hex) { + private BaseGlyphSet(BaseGlyphSetNumber10 numbers, BaseGlyphSetNumber16 hex) { BBC.PUT_OBJ(BãßBȍőnGlyphSetKeyʸᴰ.NUMBERS, numbers); BBC.PUT_OBJ(BãßBȍőnGlyphSetKeyʸᴰ.HEXIMALS, hex); } - private BaseGlyphSet(BaseGlyphSetDecimals numbers, BaseGlyphSetHeximals hex, BaseGlyphSetGematria gematria) { + private BaseGlyphSet(BaseGlyphSetNumber10 numbers, BaseGlyphSetNumber16 hex, BaseGlyphSetNumber36 gematria) { BBC.PUT_OBJ(BãßBȍőnGlyphSetKeyʸᴰ.NUMBERS, numbers); BBC.PUT_OBJ(BãßBȍőnGlyphSetKeyʸᴰ.HEXIMALS, hex); BBC.PUT_OBJ(BãßBȍőnGlyphSetKeyʸᴰ.GEMATRIA, gematria); diff --git a/numberxd/src/main/love/distributedrebirth/numberxd/base2t/glyph/BaseGlyphSetNumber.java b/numberxd/src/main/love/distributedrebirth/numberxd/base2t/glyph/BaseGlyphSetNumber.java new file mode 100644 index 00000000..e62f8d2a --- /dev/null +++ b/numberxd/src/main/love/distributedrebirth/numberxd/base2t/glyph/BaseGlyphSetNumber.java @@ -0,0 +1,13 @@ +package love.distributedrebirth.numberxd.base2t.glyph; + +import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ; + +@BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天") +public interface BaseGlyphSetNumber { + + default BaseGlyphSetNumberType BãßNumberType() { + return getClass().getAnnotation(BãßBȍőnGlyphSetNumberInfoʸᴰ.class).base(); + } + + String BȍőnCharFor(int number); +} diff --git a/numberxd/src/main/love/distributedrebirth/numberxd/base2t/glyph/BaseGlyphSetDecimals.java b/numberxd/src/main/love/distributedrebirth/numberxd/base2t/glyph/BaseGlyphSetNumber10.java similarity index 87% rename from numberxd/src/main/love/distributedrebirth/numberxd/base2t/glyph/BaseGlyphSetDecimals.java rename to numberxd/src/main/love/distributedrebirth/numberxd/base2t/glyph/BaseGlyphSetNumber10.java index 127ee0f2..e880a2e4 100644 --- a/numberxd/src/main/love/distributedrebirth/numberxd/base2t/glyph/BaseGlyphSetDecimals.java +++ b/numberxd/src/main/love/distributedrebirth/numberxd/base2t/glyph/BaseGlyphSetNumber10.java @@ -3,8 +3,9 @@ package love.distributedrebirth.numberxd.base2t.glyph; import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ; @BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天") -public class BaseGlyphSetDecimals { - +@BãßBȍőnGlyphSetNumberInfoʸᴰ(base = BaseGlyphSetNumberType.BASE_10) +public final class BaseGlyphSetNumber10 implements BaseGlyphSetNumber { + private final String char0; private final String char1; private final String char2; @@ -16,7 +17,7 @@ public class BaseGlyphSetDecimals { private final String char8; private final String char9; - public BaseGlyphSetDecimals(String char0, String char1, String char2, String char3, String char4, String char5, + public BaseGlyphSetNumber10(String char0, String char1, String char2, String char3, String char4, String char5, String char6, String char7, String char8, String char9) { super(); this.char0 = char0; @@ -31,7 +32,7 @@ public class BaseGlyphSetDecimals { this.char9 = char9; } - public String getCharFor(int number) { + public String BȍőnCharFor(int number) { switch (number) { case 0: return char0; diff --git a/numberxd/src/main/love/distributedrebirth/numberxd/base2t/glyph/BaseGlyphSetHeximals.java b/numberxd/src/main/love/distributedrebirth/numberxd/base2t/glyph/BaseGlyphSetNumber16.java similarity index 87% rename from numberxd/src/main/love/distributedrebirth/numberxd/base2t/glyph/BaseGlyphSetHeximals.java rename to numberxd/src/main/love/distributedrebirth/numberxd/base2t/glyph/BaseGlyphSetNumber16.java index 4396bb76..accd9c3a 100644 --- a/numberxd/src/main/love/distributedrebirth/numberxd/base2t/glyph/BaseGlyphSetHeximals.java +++ b/numberxd/src/main/love/distributedrebirth/numberxd/base2t/glyph/BaseGlyphSetNumber16.java @@ -3,8 +3,9 @@ package love.distributedrebirth.numberxd.base2t.glyph; import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ; @BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天") -public class BaseGlyphSetHeximals { - +@BãßBȍőnGlyphSetNumberInfoʸᴰ(base = BaseGlyphSetNumberType.BASE_16) +public final class BaseGlyphSetNumber16 implements BaseGlyphSetNumber { + private final String char0; private final String char1; private final String char2; @@ -22,7 +23,7 @@ public class BaseGlyphSetHeximals { private final String charE; private final String charF; - public BaseGlyphSetHeximals(String char0, String char1, String char2, String char3, String char4, String char5, + public BaseGlyphSetNumber16(String char0, String char1, String char2, String char3, String char4, String char5, String char6, String char7, String char8, String char9, String charA, String charB, String charC, String charD, String charE, String charF) { super(); @@ -43,8 +44,8 @@ public class BaseGlyphSetHeximals { this.charE = charE; this.charF = charF; } - - public String getCharFor(int number) { + + public String BȍőnCharFor(int number) { switch (number) { case 0: return char0; @@ -68,15 +69,15 @@ public class BaseGlyphSetHeximals { return char9; case 10: return charA; - case 20: + case 11: return charB; - case 30: + case 12: return charC; - case 40: + case 13: return charD; - case 50: + case 14: return charE; - case 60: + case 15: return charF; default: throw new IllegalArgumentException("Can't handle higher numbers: "+number); @@ -86,63 +87,63 @@ public class BaseGlyphSetHeximals { public String getChar0() { return char0; } - + public String getChar1() { return char1; } - + public String getChar2() { return char2; } - + public String getChar3() { return char3; } - + public String getChar4() { return char4; } - + public String getChar5() { return char5; } - + public String getChar6() { return char6; } - + public String getChar7() { return char7; } - + public String getChar8() { return char8; } - + public String getChar9() { return char9; } - + public String getCharA() { return charA; } - + public String getCharB() { return charB; } - + public String getCharC() { return charC; } - + public String getCharD() { return charD; } - + public String getCharE() { return charE; } - + public String getCharF() { return charF; } diff --git a/numberxd/src/main/love/distributedrebirth/numberxd/base2t/glyph/BaseGlyphSetGematria.java b/numberxd/src/main/love/distributedrebirth/numberxd/base2t/glyph/BaseGlyphSetNumber36.java similarity index 64% rename from numberxd/src/main/love/distributedrebirth/numberxd/base2t/glyph/BaseGlyphSetGematria.java rename to numberxd/src/main/love/distributedrebirth/numberxd/base2t/glyph/BaseGlyphSetNumber36.java index 48eb1c50..99ab5932 100644 --- a/numberxd/src/main/love/distributedrebirth/numberxd/base2t/glyph/BaseGlyphSetGematria.java +++ b/numberxd/src/main/love/distributedrebirth/numberxd/base2t/glyph/BaseGlyphSetNumber36.java @@ -3,8 +3,9 @@ package love.distributedrebirth.numberxd.base2t.glyph; import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ; @BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天") -public class BaseGlyphSetGematria { - +@BãßBȍőnGlyphSetNumberInfoʸᴰ(base = BaseGlyphSetNumberType.BASE_36) +public final class BaseGlyphSetNumber36 implements BaseGlyphSetNumber { + private final String char1; private final String char2; private final String char3; @@ -33,7 +34,7 @@ public class BaseGlyphSetGematria { private final String char800; private final String char900; - public BaseGlyphSetGematria(String char1, String char2, String char3, String char4, String char5, String char6, + public BaseGlyphSetNumber36(String char1, String char2, String char3, String char4, String char5, String char6, String char7, String char8, String char9, String char10, String char20, String char30, String char40, String char50, String char60, String char70, String char80, String char90, String char100, String char200, String char300, String char400, String char500, String char600, String char700, String char800, @@ -68,7 +69,7 @@ public class BaseGlyphSetGematria { this.char900 = char900; } - public String getCharFor(int number) { + public String BȍőnCharFor(int number) { switch (number) { case 1: return char1; @@ -128,4 +129,113 @@ public class BaseGlyphSetGematria { throw new IllegalArgumentException("Can't handle higher numbers: "+number); } } + + public String getChar1() { + return char1; + } + + public String getChar2() { + return char2; + } + + public String getChar3() { + return char3; + } + + public String getChar4() { + return char4; + } + + public String getChar5() { + return char5; + } + + public String getChar6() { + return char6; + } + + public String getChar7() { + return char7; + } + + public String getChar8() { + return char8; + } + + public String getChar9() { + return char9; + } + + public String getChar10() { + return char10; + } + + public String getChar20() { + return char20; + } + + public String getChar30() { + return char30; + } + + public String getChar40() { + return char40; + } + + public String getChar50() { + return char50; + } + + public String getChar60() { + return char60; + } + + public String getChar70() { + return char70; + } + + public String getChar80() { + return char80; + } + + public String getChar90() { + return char90; + } + + public String getChar100() { + return char100; + } + + public String getChar200() { + return char200; + } + + public String getChar300() { + return char300; + } + + public String getChar400() { + return char400; + } + + public String getChar500() { + return char500; + } + + public String getChar600() { + return char600; + } + + public String getChar700() { + return char700; + } + + public String getChar800() { + return char800; + } + + public String getChar900() { + return char900; + } + } diff --git a/numberxd/src/main/love/distributedrebirth/numberxd/base2t/glyph/BaseGlyphSetNumberType.java b/numberxd/src/main/love/distributedrebirth/numberxd/base2t/glyph/BaseGlyphSetNumberType.java new file mode 100644 index 00000000..e26705b1 --- /dev/null +++ b/numberxd/src/main/love/distributedrebirth/numberxd/base2t/glyph/BaseGlyphSetNumberType.java @@ -0,0 +1,10 @@ +package love.distributedrebirth.numberxd.base2t.glyph; + +import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ; + +@BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天") +public enum BaseGlyphSetNumberType { + BASE_10, + BASE_16, + BASE_36 +} diff --git a/numberxd/src/main/love/distributedrebirth/numberxd/base2t/glyph/BãßBȍőnGlyphSetNumberInfoʸᴰ.java b/numberxd/src/main/love/distributedrebirth/numberxd/base2t/glyph/BãßBȍőnGlyphSetNumberInfoʸᴰ.java new file mode 100644 index 00000000..a089506e --- /dev/null +++ b/numberxd/src/main/love/distributedrebirth/numberxd/base2t/glyph/BãßBȍőnGlyphSetNumberInfoʸᴰ.java @@ -0,0 +1,16 @@ +package love.distributedrebirth.numberxd.base2t.glyph; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ; + +@BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天") +@Retention(RetentionPolicy.RUNTIME) +@Target({ElementType.TYPE}) +public @interface BãßBȍőnGlyphSetNumberInfoʸᴰ { + + BaseGlyphSetNumberType base(); +} diff --git a/numberxd/src/main/love/distributedrebirth/numberxd/base2t/glyph/BãßBȍőnGlyphSetʸᴰ.java b/numberxd/src/main/love/distributedrebirth/numberxd/base2t/glyph/BãßBȍőnGlyphSetʸᴰ.java index e24553a8..e86b974b 100644 --- a/numberxd/src/main/love/distributedrebirth/numberxd/base2t/glyph/BãßBȍőnGlyphSetʸᴰ.java +++ b/numberxd/src/main/love/distributedrebirth/numberxd/base2t/glyph/BãßBȍőnGlyphSetʸᴰ.java @@ -7,11 +7,15 @@ import love.distributedrebirth.bassboonyd.BãßBȍőnEnumSetʸᴰ; @BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天") public interface BãßBȍőnGlyphSetʸᴰ> extends BãßBȍőnEnumSetʸᴰ, BãßBȍőnCoffinStoreʸᴰ { - default BaseGlyphSetDecimals BȍőnScriptNumbers() { - return GET_BBC().GET_OBJ(BãßBȍőnGlyphSetKeyʸᴰ.NUMBERS, BaseGlyphSetDecimals.class); + default BaseGlyphSetNumber10 BȍőnGlyphSetNumber10() { + return GET_BBC().GET_OBJ(BãßBȍőnGlyphSetKeyʸᴰ.NUMBERS, BaseGlyphSetNumber10.class); } - default BaseGlyphSetGematria BȍőnScriptGematria() { - return GET_BBC().GET_OBJ(BãßBȍőnGlyphSetKeyʸᴰ.NUMBERS, BaseGlyphSetGematria.class); + default BaseGlyphSetNumber16 BȍőnGlyphSetNumber16() { + return GET_BBC().GET_OBJ(BãßBȍőnGlyphSetKeyʸᴰ.HEXIMALS, BaseGlyphSetNumber16.class); + } + + default BaseGlyphSetNumber36 BȍőnGlyphSetNumber36() { + return GET_BBC().GET_OBJ(BãßBȍőnGlyphSetKeyʸᴰ.GEMATRIA, BaseGlyphSetNumber36.class); } } diff --git a/numberxd/src/main/love/distributedrebirth/numberxd/base2t/part/BãßBȍőnPartʸᴰ.java b/numberxd/src/main/love/distributedrebirth/numberxd/base2t/part/BãßBȍőnPartʸᴰ.java index 4cf08568..94ae3a5a 100644 --- a/numberxd/src/main/love/distributedrebirth/numberxd/base2t/part/BãßBȍőnPartʸᴰ.java +++ b/numberxd/src/main/love/distributedrebirth/numberxd/base2t/part/BãßBȍőnPartʸᴰ.java @@ -6,6 +6,7 @@ import java.util.stream.Collectors; import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ; import love.distributedrebirth.bassboonyd.BãßBȍőnCoffinStoreʸᴰ; import love.distributedrebirth.bassboonyd.BãßBȍőnEnumSetʸᴰ; +import love.distributedrebirth.numberxd.base2t.glyph.BaseGlyphSet; @BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天") public interface BãßBȍőnPartʸᴰ> extends BãßBȍőnEnumSetʸᴰ, BãßBȍőnCoffinStoreʸᴰ { @@ -26,13 +27,80 @@ public interface BãßBȍőnPartʸᴰ> extends return GET_BBC().GET_STR(BãßBȍőnPartKeyʸᴰ.CHINA_VALUE); } - default String BȍőnIdentifierLetterSupper() { - return GET_BBC().GET_STR(BãßBȍőnPartKeyʸᴰ.CHINA_KEY); + default String BȍőnGlyphSetNumber16Greek() { + return BȍőnGlyphSetNumber16(BaseGlyphSet.GREEK); } - default String BȍőnIdentifierLetterGreek() { - int ordinalOne = BȍőnRangTelEen(); - return GET_BBC().GET_STR(BãßBȍőnPartKeyʸᴰ.CHINA_KEY); + default String BȍőnGlyphSetNumber16LatinBasic() { + return BȍőnGlyphSetNumber16(BaseGlyphSet.LATIN_BASIC); + } + + default String BȍőnGlyphSetNumber16Korean() { + return BȍőnGlyphSetNumber16(BaseGlyphSet.KOREAN); + } + + default String BȍőnGlyphSetNumber16(BaseGlyphSet glyphSet) { + T[] values = BãßInstances(); + if (values.length < 10) { + return glyphSet.BȍőnGlyphSetNumber16().BȍőnCharFor(BȍőnRangTelNul()); + } else if (values.length < 255) { + StringBuilder buf = new StringBuilder(); + buf.append(glyphSet.BȍőnGlyphSetNumber16().BȍőnCharFor(BȍőnRangTelNul() >> 4)); + buf.append(glyphSet.BȍőnGlyphSetNumber16().BȍőnCharFor(BȍőnRangTelNul() & 0x0F)); + return buf.toString(); + } else if (values.length < 10000) { + StringBuilder buf = new StringBuilder(); + buf.append(glyphSet.BȍőnGlyphSetNumber16().BȍőnCharFor((BȍőnRangTelNul() >> 8) & 0x0F)); + buf.append(glyphSet.BȍőnGlyphSetNumber16().BȍőnCharFor((BȍőnRangTelNul() >> 4) & 0x0F)); + buf.append(glyphSet.BȍőnGlyphSetNumber16().BȍőnCharFor(BȍőnRangTelNul() & 0x0F)); + return buf.toString(); + } else { + throw new IllegalStateException("Can't handle more than 10000 values."); + } + } + + default String BȍőnGlyphSetNumber36Greek() { + return BȍőnGlyphSetNumber36(BaseGlyphSet.GREEK); + } + + default String BȍőnGlyphSetNumber36LatinBasic() { + return BȍőnGlyphSetNumber36(BaseGlyphSet.LATIN_BASIC); + } + + default String BȍőnGlyphSetNumber36Hebrew() { + return BȍőnGlyphSetNumber36(BaseGlyphSet.HEBREW); + } + + default String BȍőnGlyphSetNumber36Arabic() { + return BȍőnGlyphSetNumber36(BaseGlyphSet.ARABIC); + } + + default String BȍőnGlyphSetNumber36(BaseGlyphSet glyphSet) { + T[] values = BãßInstances(); + if (values.length < 10) { + return glyphSet.BȍőnGlyphSetNumber36().BȍőnCharFor(BȍőnRangTelEen()); + } else if (values.length < 100) { + int count = BȍőnRangTelNul(); + int mod10 = count % 10 + 1; + int div10 = count / 10 + 1; + //System.out.println("count="+count+" div10="+div10+" mod10="+mod10); + StringBuilder buf = new StringBuilder(); + buf.append(glyphSet.BȍőnGlyphSetNumber36().BȍőnCharFor(div10)); + buf.append(glyphSet.BȍőnGlyphSetNumber36().BȍőnCharFor(mod10)); + return buf.toString(); + } else if (values.length < 1000) { + int count = BȍőnRangTelNul(); + int mod10 = count % 10 + 1; + int div10 = count / 10 + 1; + int div100 = count / 100 + 1; + StringBuilder buf = new StringBuilder(); + buf.append(glyphSet.BȍőnGlyphSetNumber16().BȍőnCharFor(div10)); + buf.append(glyphSet.BȍőnGlyphSetNumber16().BȍőnCharFor(div100)); + buf.append(glyphSet.BȍőnGlyphSetNumber16().BȍőnCharFor(mod10)); + return buf.toString(); + } else { + throw new IllegalStateException("Can't handle more than 1000 values."); + } } @SuppressWarnings("unchecked") diff --git a/numberxd/src/test/love/distributedrebirth/numberxd/base2t/T16PartHexTest.java b/numberxd/src/test/love/distributedrebirth/numberxd/base2t/T16PartHexTest.java index ad54fc05..cdc49f67 100644 --- a/numberxd/src/test/love/distributedrebirth/numberxd/base2t/T16PartHexTest.java +++ b/numberxd/src/test/love/distributedrebirth/numberxd/base2t/T16PartHexTest.java @@ -16,9 +16,6 @@ public class T16PartHexTest { Assertions.assertNotNull(value.BȍőnIdentifierLetter()); Assertions.assertNotNull(value.BȍőnChinaKey()); Assertions.assertNotNull(value.BȍőnChinaValue()); - Assertions.assertNotNull(value.BȍőnAlt1Value()); - Assertions.assertNotNull(value.BãßAlt1Name()); - Assertions.assertNotNull(value.BãßAlt1Website()); } }