diff --git a/core/src/love/distributedrebirth/demo4d/screen/BasePartRenderer.java b/core/src/love/distributedrebirth/demo4d/screen/BasePartRenderer.java index 6ca9e8d3..45a1e194 100644 --- a/core/src/love/distributedrebirth/demo4d/screen/BasePartRenderer.java +++ b/core/src/love/distributedrebirth/demo4d/screen/BasePartRenderer.java @@ -11,11 +11,11 @@ import imgui.type.ImInt; import love.distributedrebirth.demo4d.Demo4DMain; import love.distributedrebirth.demo4d.ImGuiRendererMain; import love.distributedrebirth.numberxd.base2t.BasePartFactory; -import love.distributedrebirth.numberxd.base2t.facet.BasePart; -import love.distributedrebirth.numberxd.base2t.facet.BasePartAlt1; -import love.distributedrebirth.numberxd.base2t.facet.BasePartAlt2; -import love.distributedrebirth.numberxd.base2t.facet.BasePartAlt3; -import love.distributedrebirth.numberxd.base2t.facet.BasePartAlt4; +import love.distributedrebirth.numberxd.base2t.bone.BassBone; +import love.distributedrebirth.numberxd.base2t.bone.BassBoneAlt1; +import love.distributedrebirth.numberxd.base2t.bone.BassBoneAlt2; +import love.distributedrebirth.numberxd.base2t.bone.BassBoneAlt3; +import love.distributedrebirth.numberxd.base2t.bone.BassBoneAlt4; /** * @@ -48,7 +48,7 @@ public class BasePartRenderer extends ImGuiRendererMain { ImGui.combo("Type", selectedBasePart, bases.toArray(items)); String selectedItem = items[selectedBasePart.get()]; Integer baseNumber = Integer.valueOf(selectedItem); - BasePart[] baseParts = BasePartFactory.buildBasePartsByBase(baseNumber); + BassBone[] baseParts = BasePartFactory.buildBassBonesByBase(baseNumber); int flags = ImGuiTableFlags.ScrollX | ImGuiTableFlags.RowBg | ImGuiTableFlags.BordersOuter | ImGuiTableFlags.BordersV; ImGui.beginTable("base-part", 10, flags); @@ -64,7 +64,7 @@ public class BasePartRenderer extends ImGuiRendererMain { ImGui.tableSetupColumn("Alt4"); ImGui.tableHeadersRow(); - for (BasePart part:baseParts) { + for (BassBone part:baseParts) { ImGui.tableNextRow(); ImGui.tableNextColumn(); ImGui.text(part.name()); @@ -80,26 +80,26 @@ public class BasePartRenderer extends ImGuiRendererMain { ImGui.text(part.getChinaValue()); ImGui.tableNextColumn(); - if (part instanceof BasePartAlt1) { - ImGui.text(BasePartAlt1.class.cast(part).getAlt1Value()); + if (part instanceof BassBoneAlt1) { + ImGui.text(BassBoneAlt1.class.cast(part).getAlt1Value()); } else { ImGui.text(""); } ImGui.tableNextColumn(); - if (part instanceof BasePartAlt2) { - ImGui.text(BasePartAlt2.class.cast(part).getAlt2Value()); + if (part instanceof BassBoneAlt2) { + ImGui.text(BassBoneAlt2.class.cast(part).getAlt2Value()); } else { ImGui.text(""); } ImGui.tableNextColumn(); - if (part instanceof BasePartAlt3) { - ImGui.text(BasePartAlt3.class.cast(part).getAlt3Value()); + if (part instanceof BassBoneAlt3) { + ImGui.text(BassBoneAlt3.class.cast(part).getAlt3Value()); } else { ImGui.text(""); } ImGui.tableNextColumn(); - if (part instanceof BasePartAlt4) { - ImGui.text(BasePartAlt4.class.cast(part).getAlt4Value()); + if (part instanceof BassBoneAlt4) { + ImGui.text(BassBoneAlt4.class.cast(part).getAlt4Value()); } else { ImGui.text(""); } diff --git a/numberxd/src/main/love/distributedrebirth/numberxd/base2t/BasePartFactory.java b/numberxd/src/main/love/distributedrebirth/numberxd/base2t/BasePartFactory.java index 7f9a6ce0..a1690fea 100644 --- a/numberxd/src/main/love/distributedrebirth/numberxd/base2t/BasePartFactory.java +++ b/numberxd/src/main/love/distributedrebirth/numberxd/base2t/BasePartFactory.java @@ -1,6 +1,6 @@ package love.distributedrebirth.numberxd.base2t; -import love.distributedrebirth.numberxd.base2t.facet.BasePart; +import love.distributedrebirth.numberxd.base2t.bone.BassBone; public final class BasePartFactory { @@ -10,7 +10,7 @@ public final class BasePartFactory { return SUPPORTED_BASES; } - public static BasePart[] buildBasePartsByBase(int base) { + public static BassBone[] buildBassBonesByBase(int base) { switch (base) { case 2: return T02PartBinary.values(); diff --git a/numberxd/src/main/love/distributedrebirth/numberxd/base2t/T02PartBinary.java b/numberxd/src/main/love/distributedrebirth/numberxd/base2t/T02PartBinary.java index d863a2f2..1867b7c8 100644 --- a/numberxd/src/main/love/distributedrebirth/numberxd/base2t/T02PartBinary.java +++ b/numberxd/src/main/love/distributedrebirth/numberxd/base2t/T02PartBinary.java @@ -6,38 +6,40 @@ import java.util.Map; import java.util.function.Consumer; import java.util.stream.Collectors; -import love.distributedrebirth.numberxd.base2t.facet.BasePart; -import love.distributedrebirth.numberxd.base2t.facet.BaseFacetKey; -import love.distributedrebirth.numberxd.base2t.facet.BaseFacetMap; +import love.distributedrebirth.numberxd.base2t.bone.BassBone; +import love.distributedrebirth.numberxd.base2t.bone.BassBoneCoffin; +import love.distributedrebirth.numberxd.base2t.bone.BassBoneName; +import love.distributedrebirth.numberxd.base2t.bone.BassBoneStoreKey; /** * The distribution by 2. * * @author willemtsade ©Δ∞ 仙上主天 */ -public enum T02PartBinary implements BasePart { +@BassBoneName("T02PartBinary") +public enum T02PartBinary implements BassBone { PART_1("˧","0", "低", "low"), PART_2("꜔","1", "高", "high"), ; public static int LENGTH() { return values().length; }; - private final BaseFacetMap bfm = BaseFacetMap.newInstance(); + private final BassBoneCoffin bbc = BassBoneCoffin.newInstance(); 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 idTone, String idLetter, String chinaKey, String chinaValue) { - this.getBFM().putInit(BaseFacetKey.ID_TONE, idTone); - this.getBFM().putInit(BaseFacetKey.ID_LETTER, idLetter); - this.getBFM().putInit(BaseFacetKey.CHINA_KEY, chinaKey); - this.getBFM().putInit(BaseFacetKey.CHINA_VALUE, chinaValue); + this.getBBC().putInit(BassBoneStoreKey.ID_TONE, idTone); + this.getBBC().putInit(BassBoneStoreKey.ID_LETTER, idLetter); + this.getBBC().putInit(BassBoneStoreKey.CHINA_KEY, chinaKey); + this.getBBC().putInit(BassBoneStoreKey.CHINA_VALUE, chinaValue); } @Override - public BaseFacetMap getBFM() { - return bfm; + public BassBoneCoffin getBBC() { + return bbc; } public static void forEach(Consumer consumer) { diff --git a/numberxd/src/main/love/distributedrebirth/numberxd/base2t/T03PartTrit.java b/numberxd/src/main/love/distributedrebirth/numberxd/base2t/T03PartTrit.java index ca836b3c..7a793d61 100644 --- a/numberxd/src/main/love/distributedrebirth/numberxd/base2t/T03PartTrit.java +++ b/numberxd/src/main/love/distributedrebirth/numberxd/base2t/T03PartTrit.java @@ -6,16 +6,18 @@ import java.util.Map; import java.util.function.Consumer; import java.util.stream.Collectors; -import love.distributedrebirth.numberxd.base2t.facet.BasePart; -import love.distributedrebirth.numberxd.base2t.facet.BaseFacetKey; -import love.distributedrebirth.numberxd.base2t.facet.BaseFacetMap; +import love.distributedrebirth.numberxd.base2t.bone.BassBone; +import love.distributedrebirth.numberxd.base2t.bone.BassBoneCoffin; +import love.distributedrebirth.numberxd.base2t.bone.BassBoneName; +import love.distributedrebirth.numberxd.base2t.bone.BassBoneStoreKey; /** * The distribution by 3. * * @author willemtsade ©Δ∞ 仙上主天 */ -public enum T03PartTrit implements BasePart { +@BassBoneName("T03PartTrit") +public enum T03PartTrit implements BassBone { PART_1("˦","0","一","1"), PART_2("˧","1","二","2"), @@ -23,22 +25,22 @@ public enum T03PartTrit implements BasePart { ; public static int LENGTH() { return values().length; }; - private final BaseFacetMap bfm = BaseFacetMap.newInstance(); + private final BassBoneCoffin bbc = BassBoneCoffin.newInstance(); 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 idTone, String idLetter, String chinaKey, String chinaValue) { - this.getBFM().putInit(BaseFacetKey.ID_TONE, idTone); - this.getBFM().putInit(BaseFacetKey.ID_LETTER, idLetter); - this.getBFM().putInit(BaseFacetKey.CHINA_KEY, chinaKey); - this.getBFM().putInit(BaseFacetKey.CHINA_VALUE, chinaValue); + this.getBBC().putInit(BassBoneStoreKey.ID_TONE, idTone); + this.getBBC().putInit(BassBoneStoreKey.ID_LETTER, idLetter); + this.getBBC().putInit(BassBoneStoreKey.CHINA_KEY, chinaKey); + this.getBBC().putInit(BassBoneStoreKey.CHINA_VALUE, chinaValue); } @Override - public BaseFacetMap getBFM() { - return bfm; + public BassBoneCoffin getBBC() { + return bbc; } public static void forEach(Consumer consumer) { diff --git a/numberxd/src/main/love/distributedrebirth/numberxd/base2t/T04PartQuad.java b/numberxd/src/main/love/distributedrebirth/numberxd/base2t/T04PartQuad.java index db80572e..7b7f0bea 100644 --- a/numberxd/src/main/love/distributedrebirth/numberxd/base2t/T04PartQuad.java +++ b/numberxd/src/main/love/distributedrebirth/numberxd/base2t/T04PartQuad.java @@ -6,18 +6,22 @@ import java.util.Map; import java.util.function.Consumer; import java.util.stream.Collectors; -import love.distributedrebirth.numberxd.base2t.facet.BasePart; -import love.distributedrebirth.numberxd.base2t.facet.BaseFacetKey; -import love.distributedrebirth.numberxd.base2t.facet.BaseFacetMap; -import love.distributedrebirth.numberxd.base2t.facet.BasePartAlt1; -import love.distributedrebirth.numberxd.base2t.facet.BasePartSplit4; +import love.distributedrebirth.numberxd.base2t.bone.BasePartSplit4; +import love.distributedrebirth.numberxd.base2t.bone.BassBone; +import love.distributedrebirth.numberxd.base2t.bone.BassBoneAlt1; +import love.distributedrebirth.numberxd.base2t.bone.BassBoneAlt1Info; +import love.distributedrebirth.numberxd.base2t.bone.BassBoneCoffin; +import love.distributedrebirth.numberxd.base2t.bone.BassBoneName; +import love.distributedrebirth.numberxd.base2t.bone.BassBoneStoreKey; /** * The distribution by 4. * * @author willemtsade ©Δ∞ 仙上主天 */ -public enum T04PartQuad implements BasePart,BasePartAlt1,BasePartSplit4 { +@BassBoneName("T04PartQuad") +@BassBoneAlt1Info(name="Cardinal direction", website="https://simple.wikipedia.org/wiki/Cardinal_direction") +public enum T04PartQuad implements BassBone,BassBoneAlt1,BasePartSplit4 { PART_1("˥","0","北","north","N"), PART_2("꜒","1","東","east", "E"), @@ -26,27 +30,23 @@ public enum T04PartQuad implements BasePart,BasePartAlt1,BasePartSplit4 { ; public static int LENGTH() { return values().length; }; - private final BaseFacetMap bfm = BaseFacetMap.newInstance(); - private static final String ALT_1_NAME = "Cardinal direction"; - private static final String ALT_1_WIKI = "https://simple.wikipedia.org/wiki/Cardinal_direction"; + private final BassBoneCoffin bbc = BassBoneCoffin.newInstance(); 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 T04PartQuad(String idTone, String idLetter, String chinaKey, String chinaValue, String alt1Value) { - this.getBFM().putInit(BaseFacetKey.ID_TONE, idTone); - this.getBFM().putInit(BaseFacetKey.ID_LETTER, idLetter); - this.getBFM().putInit(BaseFacetKey.CHINA_KEY, chinaKey); - 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.getBBC().putInit(BassBoneStoreKey.ID_TONE, idTone); + this.getBBC().putInit(BassBoneStoreKey.ID_LETTER, idLetter); + this.getBBC().putInit(BassBoneStoreKey.CHINA_KEY, chinaKey); + this.getBBC().putInit(BassBoneStoreKey.CHINA_VALUE, chinaValue); + this.getBBC().putInit(BassBoneStoreKey.ALT_1_VALUE, alt1Value); } @Override - public BaseFacetMap getBFM() { - return bfm; + public BassBoneCoffin getBBC() { + return bbc; } public static void forEach(Consumer consumer) { diff --git a/numberxd/src/main/love/distributedrebirth/numberxd/base2t/T05PartPental.java b/numberxd/src/main/love/distributedrebirth/numberxd/base2t/T05PartPental.java index ec118b2f..dd6cb1af 100644 --- a/numberxd/src/main/love/distributedrebirth/numberxd/base2t/T05PartPental.java +++ b/numberxd/src/main/love/distributedrebirth/numberxd/base2t/T05PartPental.java @@ -6,17 +6,23 @@ import java.util.Map; import java.util.function.Consumer; import java.util.stream.Collectors; -import love.distributedrebirth.numberxd.base2t.facet.BasePart; -import love.distributedrebirth.numberxd.base2t.facet.BasePartAlt2; -import love.distributedrebirth.numberxd.base2t.facet.BaseFacetKey; -import love.distributedrebirth.numberxd.base2t.facet.BaseFacetMap; +import love.distributedrebirth.numberxd.base2t.bone.BassBone; +import love.distributedrebirth.numberxd.base2t.bone.BassBoneAlt1Info; +import love.distributedrebirth.numberxd.base2t.bone.BassBoneAlt2; +import love.distributedrebirth.numberxd.base2t.bone.BassBoneAlt2Info; +import love.distributedrebirth.numberxd.base2t.bone.BassBoneCoffin; +import love.distributedrebirth.numberxd.base2t.bone.BassBoneName; +import love.distributedrebirth.numberxd.base2t.bone.BassBoneStoreKey; /** * The distribution by 5 called Wuxing. * * @author willemtsade ©Δ∞ 仙上主天 */ -public enum T05PartPental implements BasePart,BasePartAlt2 { +@BassBoneName("T05PartPental") +@BassBoneAlt1Info(name="Pentagram", website="https://en.wikipedia.org/wiki/Pentagram") +@BassBoneAlt2Info(name="Pythagorean Interpretations", website="http://wisdomofhypatia.com/OM/BA/PP.html") +public enum T05PartPental implements BassBone,BassBoneAlt2 { PART_1("˥","0","火","fire", "EI","heile"), PART_2("˦","1","水","water","U", "hudor"), @@ -26,32 +32,24 @@ public enum T05PartPental implements BasePart,BasePartAlt2 { ; public static int LENGTH() { return values().length; }; - private static final String ALT_1_NAME = "Pentagram"; - private static final String ALT_1_WIKI = "https://en.wikipedia.org/wiki/Pentagram"; - private static final String ALT_2_NAME = "Pythagorean Interpretations"; - private static final String ALT_2_WIKI = "http://wisdomofhypatia.com/OM/BA/PP.html"; - private final BaseFacetMap bfm = BaseFacetMap.newInstance(); + private final BassBoneCoffin bbc = BassBoneCoffin.newInstance(); 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 T05PartPental(String idTone, String idLetter, String chinaKey, String chinaValue, String alt1Value, String alt2Value) { - this.getBFM().putInit(BaseFacetKey.ID_TONE, idTone); - this.getBFM().putInit(BaseFacetKey.ID_LETTER, idLetter); - this.getBFM().putInit(BaseFacetKey.CHINA_KEY, chinaKey); - 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.getBBC().putInit(BassBoneStoreKey.ID_TONE, idTone); + this.getBBC().putInit(BassBoneStoreKey.ID_LETTER, idLetter); + this.getBBC().putInit(BassBoneStoreKey.CHINA_KEY, chinaKey); + this.getBBC().putInit(BassBoneStoreKey.CHINA_VALUE, chinaValue); + this.getBBC().putInit(BassBoneStoreKey.ALT_1_VALUE, alt1Value); + this.getBBC().putInit(BassBoneStoreKey.ALT_2_VALUE, alt2Value); } @Override - public BaseFacetMap getBFM() { - return bfm; + public BassBoneCoffin getBBC() { + return bbc; } public static void forEach(Consumer consumer) { diff --git a/numberxd/src/main/love/distributedrebirth/numberxd/base2t/T06PartSeximal.java b/numberxd/src/main/love/distributedrebirth/numberxd/base2t/T06PartSeximal.java index 3fc11743..dfa04fee 100644 --- a/numberxd/src/main/love/distributedrebirth/numberxd/base2t/T06PartSeximal.java +++ b/numberxd/src/main/love/distributedrebirth/numberxd/base2t/T06PartSeximal.java @@ -6,11 +6,13 @@ import java.util.Map; import java.util.function.Consumer; import java.util.stream.Collectors; -import love.distributedrebirth.numberxd.base2t.facet.BasePart; -import love.distributedrebirth.numberxd.base2t.facet.BaseFacetKey; -import love.distributedrebirth.numberxd.base2t.facet.BaseFacetMap; -import love.distributedrebirth.numberxd.base2t.facet.BasePartAlt1; -import love.distributedrebirth.numberxd.base2t.facet.BasePartSplit6; +import love.distributedrebirth.numberxd.base2t.bone.BasePartSplit6; +import love.distributedrebirth.numberxd.base2t.bone.BassBone; +import love.distributedrebirth.numberxd.base2t.bone.BassBoneAlt1; +import love.distributedrebirth.numberxd.base2t.bone.BassBoneAlt1Info; +import love.distributedrebirth.numberxd.base2t.bone.BassBoneCoffin; +import love.distributedrebirth.numberxd.base2t.bone.BassBoneName; +import love.distributedrebirth.numberxd.base2t.bone.BassBoneStoreKey; /** * The distribution by 6. @@ -19,7 +21,9 @@ import love.distributedrebirth.numberxd.base2t.facet.BasePartSplit6; * * @author willemtsade ©Δ∞ 仙上主天 */ -public enum T06PartSeximal implements BasePart,BasePartAlt1,BasePartSplit6 { +@BassBoneName("T06PartSeximal") +@BassBoneAlt1Info(name="ADFGVX cipher", website="https://en.wikipedia.org/wiki/ADFGVX_cipher") +public enum T06PartSeximal implements BassBone,BassBoneAlt1,BasePartSplit6 { PART_1("˦","0","四","4","A"), PART_2("˨","1","五","5","D"), @@ -30,27 +34,23 @@ public enum T06PartSeximal implements BasePart,BasePartAlt1,BasePartSplit6 { ; public static int LENGTH() { return values().length; }; - private final BaseFacetMap bfm = BaseFacetMap.newInstance(); - private static final String ALT_1_NAME = "ADFGVX cipher"; - private static final String ALT_1_WIKI = "https://en.wikipedia.org/wiki/ADFGVX_cipher"; + private final BassBoneCoffin bbc = BassBoneCoffin.newInstance(); 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 T06PartSeximal(String idTone, String idLetter, String chinaKey, String chinaValue, String alt1Value) { - this.getBFM().putInit(BaseFacetKey.ID_TONE, idTone); - this.getBFM().putInit(BaseFacetKey.ID_LETTER, idLetter); - this.getBFM().putInit(BaseFacetKey.CHINA_KEY, chinaKey); - 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.getBBC().putInit(BassBoneStoreKey.ID_TONE, idTone); + this.getBBC().putInit(BassBoneStoreKey.ID_LETTER, idLetter); + this.getBBC().putInit(BassBoneStoreKey.CHINA_KEY, chinaKey); + this.getBBC().putInit(BassBoneStoreKey.CHINA_VALUE, chinaValue); + this.getBBC().putInit(BassBoneStoreKey.ALT_1_VALUE, alt1Value); } @Override - public BaseFacetMap getBFM() { - return bfm; + public BassBoneCoffin getBBC() { + return bbc; } public static void forEach(Consumer consumer) { diff --git a/numberxd/src/main/love/distributedrebirth/numberxd/base2t/T07PartPlanIt.java b/numberxd/src/main/love/distributedrebirth/numberxd/base2t/T07PartPlanIt.java index 5fe8d09d..cf263697 100644 --- a/numberxd/src/main/love/distributedrebirth/numberxd/base2t/T07PartPlanIt.java +++ b/numberxd/src/main/love/distributedrebirth/numberxd/base2t/T07PartPlanIt.java @@ -6,17 +6,21 @@ import java.util.Map; import java.util.function.Consumer; import java.util.stream.Collectors; -import love.distributedrebirth.numberxd.base2t.facet.BasePart; -import love.distributedrebirth.numberxd.base2t.facet.BaseFacetKey; -import love.distributedrebirth.numberxd.base2t.facet.BaseFacetMap; -import love.distributedrebirth.numberxd.base2t.facet.BasePartAlt1; +import love.distributedrebirth.numberxd.base2t.bone.BassBone; +import love.distributedrebirth.numberxd.base2t.bone.BassBoneAlt1; +import love.distributedrebirth.numberxd.base2t.bone.BassBoneAlt1Info; +import love.distributedrebirth.numberxd.base2t.bone.BassBoneCoffin; +import love.distributedrebirth.numberxd.base2t.bone.BassBoneName; +import love.distributedrebirth.numberxd.base2t.bone.BassBoneStoreKey; /** * The distribution by 7. * * @author willemtsade ©Δ∞ 仙上主天 */ -public enum T07PartPlanIt implements BasePart,BasePartAlt1 { +@BassBoneName("T07PartPlanIt") +@BassBoneAlt1Info(name="Fallen sign", website="https://en.wikipedia.org/wiki/Classical_planet#Western_astrology") +public enum T07PartPlanIt implements BassBone,BassBoneAlt1 { PART_1("˥","0","♎︎","libra","天秤座"), PART_2("꜉","1","♏︎","scorpio","天蠍座"), @@ -28,27 +32,23 @@ public enum T07PartPlanIt implements BasePart,BasePartAlt1 { ; public static int LENGTH() { return values().length; }; - private final BaseFacetMap bfm = BaseFacetMap.newInstance(); - private static final String ALT_1_NAME = "Fallen sign"; - private static final String ALT_1_WIKI = "https://en.wikipedia.org/wiki/Classical_planet#Western_astrology"; + private final BassBoneCoffin bbc = BassBoneCoffin.newInstance(); 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 T07PartPlanIt(String idTone, String idLetter, String chinaKey, String chinaValue, String alt1Value) { - this.getBFM().putInit(BaseFacetKey.ID_TONE, idTone); - this.getBFM().putInit(BaseFacetKey.ID_LETTER, idLetter); - this.getBFM().putInit(BaseFacetKey.CHINA_KEY, chinaKey); - 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.getBBC().putInit(BassBoneStoreKey.ID_TONE, idTone); + this.getBBC().putInit(BassBoneStoreKey.ID_LETTER, idLetter); + this.getBBC().putInit(BassBoneStoreKey.CHINA_KEY, chinaKey); + this.getBBC().putInit(BassBoneStoreKey.CHINA_VALUE, chinaValue); + this.getBBC().putInit(BassBoneStoreKey.ALT_1_VALUE, alt1Value); } @Override - public BaseFacetMap getBFM() { - return bfm; + public BassBoneCoffin getBBC() { + return bbc; } public static void forEach(Consumer consumer) { diff --git a/numberxd/src/main/love/distributedrebirth/numberxd/base2t/T08PartOctal.java b/numberxd/src/main/love/distributedrebirth/numberxd/base2t/T08PartOctal.java index 5e33508a..5ae71a7f 100644 --- a/numberxd/src/main/love/distributedrebirth/numberxd/base2t/T08PartOctal.java +++ b/numberxd/src/main/love/distributedrebirth/numberxd/base2t/T08PartOctal.java @@ -6,18 +6,24 @@ import java.util.Map; import java.util.function.Consumer; import java.util.stream.Collectors; -import love.distributedrebirth.numberxd.base2t.facet.BasePart; -import love.distributedrebirth.numberxd.base2t.facet.BaseFacetKey; -import love.distributedrebirth.numberxd.base2t.facet.BaseFacetMap; -import love.distributedrebirth.numberxd.base2t.facet.BasePartAlt2; -import love.distributedrebirth.numberxd.base2t.facet.BasePartSplit8; +import love.distributedrebirth.numberxd.base2t.bone.BasePartSplit8; +import love.distributedrebirth.numberxd.base2t.bone.BassBone; +import love.distributedrebirth.numberxd.base2t.bone.BassBoneAlt1Info; +import love.distributedrebirth.numberxd.base2t.bone.BassBoneAlt2; +import love.distributedrebirth.numberxd.base2t.bone.BassBoneAlt2Info; +import love.distributedrebirth.numberxd.base2t.bone.BassBoneCoffin; +import love.distributedrebirth.numberxd.base2t.bone.BassBoneName; +import love.distributedrebirth.numberxd.base2t.bone.BassBoneStoreKey; /** * The distribution by 8. * * @author willemtsade ©Δ∞ 仙上主天 */ -public enum T08PartOctal implements BasePart,BasePartAlt2,BasePartSplit8 { +@BassBoneName("T08PartOctal") +@BassBoneAlt1Info(name="Absolute Tone Sequence", website="https://en.wikipedia.org/wiki/Tone_letter") +@BassBoneAlt2Info(name="Relative Tone Sequence", website="https://en.wikipedia.org/wiki/Tone_letter") +public enum T08PartOctal implements BassBone,BassBoneAlt2,BasePartSplit8 { PART_1("˥","0","心","heart","˧˥˩","˥˩˧", 0), PART_2("˩","1","頭","head", "˧˩˥","˩˥˧", 3), @@ -32,34 +38,25 @@ public enum T08PartOctal implements BasePart,BasePartAlt2,BasePartSplit8 { public static int LENGTH() { return values().length; }; public static int BIT_COUNT = 3; private static final byte BITMASK = 0x07; - private final BaseFacetMap bfm = BaseFacetMap.newInstance(); - private static final String ALT_1_NAME = "Absolute Tone Sequence"; - private static final String ALT_1_WIKI = "https://en.wikipedia.org/wiki/Tone_letter"; - private static final String ALT_2_NAME = "Relative Tone Sequence"; - private static final String ALT_2_WIKI = "https://en.wikipedia.org/wiki/Tone_letter"; - + private final BassBoneCoffin bbc = BassBoneCoffin.newInstance(); 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 T08PartOctal(String identifierTone, String identifierLetter, String chinaKey, String chinaValue, String alt1Value, String alt2Value, int shiftBits) { - this.getBFM().putInit(BaseFacetKey.ID_TONE, identifierTone); - this.getBFM().putInit(BaseFacetKey.ID_LETTER, identifierLetter); - this.getBFM().putInit(BaseFacetKey.CHINA_KEY, chinaKey); - this.getBFM().putInit(BaseFacetKey.CHINA_VALUE, chinaValue); - this.getBFM().putInit(BaseFacetKey.SHIFT_BITS, Integer.valueOf(shiftBits)); - 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.getBBC().putInit(BassBoneStoreKey.ID_TONE, identifierTone); + this.getBBC().putInit(BassBoneStoreKey.ID_LETTER, identifierLetter); + this.getBBC().putInit(BassBoneStoreKey.CHINA_KEY, chinaKey); + this.getBBC().putInit(BassBoneStoreKey.CHINA_VALUE, chinaValue); + this.getBBC().putInit(BassBoneStoreKey.SHIFT_BITS, Integer.valueOf(shiftBits)); + this.getBBC().putInit(BassBoneStoreKey.ALT_1_VALUE, alt1Value); + this.getBBC().putInit(BassBoneStoreKey.ALT_2_VALUE, alt2Value); } @Override - public BaseFacetMap getBFM() { - return bfm; + public BassBoneCoffin getBBC() { + return bbc; } public static T08PartOctal indexOf(T08PartOctal group, int value) { diff --git a/numberxd/src/main/love/distributedrebirth/numberxd/base2t/T10PartDecimal.java b/numberxd/src/main/love/distributedrebirth/numberxd/base2t/T10PartDecimal.java index 2196a0c5..374d52d2 100644 --- a/numberxd/src/main/love/distributedrebirth/numberxd/base2t/T10PartDecimal.java +++ b/numberxd/src/main/love/distributedrebirth/numberxd/base2t/T10PartDecimal.java @@ -6,17 +6,27 @@ import java.util.Map; import java.util.function.Consumer; import java.util.stream.Collectors; -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.BaseFacetMap; +import love.distributedrebirth.numberxd.base2t.bone.BassBone; +import love.distributedrebirth.numberxd.base2t.bone.BassBoneAlt1Info; +import love.distributedrebirth.numberxd.base2t.bone.BassBoneAlt2Info; +import love.distributedrebirth.numberxd.base2t.bone.BassBoneAlt3Info; +import love.distributedrebirth.numberxd.base2t.bone.BassBoneAlt4; +import love.distributedrebirth.numberxd.base2t.bone.BassBoneAlt4Info; +import love.distributedrebirth.numberxd.base2t.bone.BassBoneCoffin; +import love.distributedrebirth.numberxd.base2t.bone.BassBoneName; +import love.distributedrebirth.numberxd.base2t.bone.BassBoneStoreKey; /** * The distribution by 10. * * @author willemtsade ©Δ∞ 仙上主天 */ -public enum T10PartDecimal implements BasePart,BasePartAlt4 { +@BassBoneName("T10PartDecimal") +@BassBoneAlt1Info(name="Korean numerals", website="https://en.wikipedia.org/wiki/Korean_numerals") +@BassBoneAlt2Info(name="Burmese numerals", website="https://en.wikipedia.org/wiki/Burmese_numerals") +@BassBoneAlt3Info(name="Bengali numerals", website="https://en.wikipedia.org/wiki/Bengali_numerals") +@BassBoneAlt4Info(name="Sinhala Lith Illakkam", website="https://en.wikipedia.org/wiki/Sinhala_numerals#Numerals") +public enum T10PartDecimal implements BassBone,BassBoneAlt4 { PART_1 ("˥","ō","零","zero", "영","\u1040","০", "෦"), PART_2 ("˦","α","壹","one", "일","\u1041","১", "෧"), @@ -31,15 +41,7 @@ public enum T10PartDecimal implements BasePart,BasePartAlt4 { ; public static int LENGTH() { return values().length; }; - 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 final BassBoneCoffin bbc = BassBoneCoffin.newInstance(); 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( @@ -47,27 +49,19 @@ public enum T10PartDecimal implements BasePart,BasePartAlt4 { 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_LETTER, idLetter); - this.getBFM().putInit(BaseFacetKey.CHINA_KEY, chinaKey); - 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); + this.getBBC().putInit(BassBoneStoreKey.ID_TONE, idTone); + this.getBBC().putInit(BassBoneStoreKey.ID_LETTER, idLetter); + this.getBBC().putInit(BassBoneStoreKey.CHINA_KEY, chinaKey); + this.getBBC().putInit(BassBoneStoreKey.CHINA_VALUE, chinaValue); + this.getBBC().putInit(BassBoneStoreKey.ALT_1_VALUE, alt1Value); + this.getBBC().putInit(BassBoneStoreKey.ALT_2_VALUE, alt2Value); + this.getBBC().putInit(BassBoneStoreKey.ALT_3_VALUE, alt3Value); + this.getBBC().putInit(BassBoneStoreKey.ALT_4_VALUE, alt4Value); } @Override - public BaseFacetMap getBFM() { - return bfm; + public BassBoneCoffin getBBC() { + return bbc; } public static void forEach(Consumer consumer) { diff --git a/numberxd/src/main/love/distributedrebirth/numberxd/base2t/T11PartUndecimal.java b/numberxd/src/main/love/distributedrebirth/numberxd/base2t/T11PartUndecimal.java index d4fca94c..3fb0e0ca 100644 --- a/numberxd/src/main/love/distributedrebirth/numberxd/base2t/T11PartUndecimal.java +++ b/numberxd/src/main/love/distributedrebirth/numberxd/base2t/T11PartUndecimal.java @@ -6,17 +6,21 @@ import java.util.Map; import java.util.function.Consumer; import java.util.stream.Collectors; -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.BaseFacetMap; +import love.distributedrebirth.numberxd.base2t.bone.BassBone; +import love.distributedrebirth.numberxd.base2t.bone.BassBoneAlt1; +import love.distributedrebirth.numberxd.base2t.bone.BassBoneAlt1Info; +import love.distributedrebirth.numberxd.base2t.bone.BassBoneCoffin; +import love.distributedrebirth.numberxd.base2t.bone.BassBoneName; +import love.distributedrebirth.numberxd.base2t.bone.BassBoneStoreKey; /** * The distribution by 11. * * @author willemtsade ©Δ∞ 仙上主天 */ -public enum T11PartUndecimal implements BasePart,BasePartAlt1 { +@BassBoneName("T11PartUndecimal") +@BassBoneAlt1Info(name="Tamil numerals", website="https://en.wikipedia.org/wiki/Tamil_numerals") +public enum T11PartUndecimal implements BassBone,BassBoneAlt1 { PART_1 ("˥","0","走","walk", "௦"), PART_2 ("꜈","1","跑","run", "௧"), @@ -32,27 +36,23 @@ public enum T11PartUndecimal implements BasePart,BasePartAlt1 { ; public static int LENGTH() { return values().length; }; - 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 final BassBoneCoffin bbc = BassBoneCoffin.newInstance(); 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 T11PartUndecimal(String idTone, String idLetter, String chinaKey, String chinaValue, String alt1Value) { - this.getBFM().putInit(BaseFacetKey.ID_TONE, idTone); - this.getBFM().putInit(BaseFacetKey.ID_LETTER, idLetter); - this.getBFM().putInit(BaseFacetKey.CHINA_KEY, chinaKey); - 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.getBBC().putInit(BassBoneStoreKey.ID_TONE, idTone); + this.getBBC().putInit(BassBoneStoreKey.ID_LETTER, idLetter); + this.getBBC().putInit(BassBoneStoreKey.CHINA_KEY, chinaKey); + this.getBBC().putInit(BassBoneStoreKey.CHINA_VALUE, chinaValue); + this.getBBC().putInit(BassBoneStoreKey.ALT_1_VALUE, alt1Value); } @Override - public BaseFacetMap getBFM() { - return bfm; + public BassBoneCoffin getBBC() { + return bbc; } public static void forEach(Consumer consumer) { diff --git a/numberxd/src/main/love/distributedrebirth/numberxd/base2t/T12PartUncial.java b/numberxd/src/main/love/distributedrebirth/numberxd/base2t/T12PartUncial.java index edda750f..6183bd80 100644 --- a/numberxd/src/main/love/distributedrebirth/numberxd/base2t/T12PartUncial.java +++ b/numberxd/src/main/love/distributedrebirth/numberxd/base2t/T12PartUncial.java @@ -6,17 +6,21 @@ import java.util.Map; import java.util.function.Consumer; import java.util.stream.Collectors; -import love.distributedrebirth.numberxd.base2t.facet.BasePart; -import love.distributedrebirth.numberxd.base2t.facet.BaseFacetKey; -import love.distributedrebirth.numberxd.base2t.facet.BaseFacetMap; -import love.distributedrebirth.numberxd.base2t.facet.BasePartAlt1; +import love.distributedrebirth.numberxd.base2t.bone.BassBone; +import love.distributedrebirth.numberxd.base2t.bone.BassBoneAlt1; +import love.distributedrebirth.numberxd.base2t.bone.BassBoneAlt1Info; +import love.distributedrebirth.numberxd.base2t.bone.BassBoneCoffin; +import love.distributedrebirth.numberxd.base2t.bone.BassBoneName; +import love.distributedrebirth.numberxd.base2t.bone.BassBoneStoreKey; /** * The distribution by 12. * * @author willemtsade ©Δ∞ 仙上主天 */ -public enum T12PartUncial implements BasePart,BasePartAlt1 { +@BassBoneName("T12PartUncial") +@BassBoneAlt1Info(name="Transdecimal symbols", website="https://en.wikipedia.org/wiki/Duodecimal#Transdecimal_symbols") +public enum T12PartUncial implements BassBone,BassBoneAlt1 { PART_1 ("˥","0","日","sun", "0"), PART_2 ("˧","1","月","moon", "1"), @@ -33,27 +37,23 @@ public enum T12PartUncial implements BasePart,BasePartAlt1 { ; public static int LENGTH() { return values().length; }; - private final BaseFacetMap bfm = BaseFacetMap.newInstance(); - private static final String ALT_1_NAME = "Transdecimal symbols"; - private static final String ALT_1_WIKI = "https://en.wikipedia.org/wiki/Duodecimal#Transdecimal_symbols"; + private final BassBoneCoffin bbc = BassBoneCoffin.newInstance(); 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 T12PartUncial(String idTone, String idLetter, String chinaKey, String chinaValue, String alt1Value) { - this.getBFM().putInit(BaseFacetKey.ID_TONE, idTone); - this.getBFM().putInit(BaseFacetKey.ID_LETTER, idLetter); - this.getBFM().putInit(BaseFacetKey.CHINA_KEY, chinaKey); - 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.getBBC().putInit(BassBoneStoreKey.ID_TONE, idTone); + this.getBBC().putInit(BassBoneStoreKey.ID_LETTER, idLetter); + this.getBBC().putInit(BassBoneStoreKey.CHINA_KEY, chinaKey); + this.getBBC().putInit(BassBoneStoreKey.CHINA_VALUE, chinaValue); + this.getBBC().putInit(BassBoneStoreKey.ALT_1_VALUE, alt1Value); } @Override - public BaseFacetMap getBFM() { - return bfm; + public BassBoneCoffin getBBC() { + return bbc; } public static void forEach(Consumer consumer) { diff --git a/numberxd/src/main/love/distributedrebirth/numberxd/base2t/T16PartHex.java b/numberxd/src/main/love/distributedrebirth/numberxd/base2t/T16PartHex.java index 507e5ce6..39cdcbcc 100644 --- a/numberxd/src/main/love/distributedrebirth/numberxd/base2t/T16PartHex.java +++ b/numberxd/src/main/love/distributedrebirth/numberxd/base2t/T16PartHex.java @@ -6,59 +6,59 @@ import java.util.Map; import java.util.function.Consumer; import java.util.stream.Collectors; -import love.distributedrebirth.numberxd.base2t.facet.BasePart; -import love.distributedrebirth.numberxd.base2t.facet.BaseFacetKey; -import love.distributedrebirth.numberxd.base2t.facet.BaseFacetMap; -import love.distributedrebirth.numberxd.base2t.facet.BasePartAlt1; -import love.distributedrebirth.numberxd.base2t.facet.BasePartSplit16; +import love.distributedrebirth.numberxd.base2t.bone.BasePartSplit16; +import love.distributedrebirth.numberxd.base2t.bone.BassBone; +import love.distributedrebirth.numberxd.base2t.bone.BassBoneAlt1; +import love.distributedrebirth.numberxd.base2t.bone.BassBoneAlt1Info; +import love.distributedrebirth.numberxd.base2t.bone.BassBoneCoffin; +import love.distributedrebirth.numberxd.base2t.bone.BassBoneName; +import love.distributedrebirth.numberxd.base2t.bone.BassBoneStoreKey; /** * The distribution by 16. * * @author willemtsade ©Δ∞ 仙上主天 */ -public enum T16PartHex implements BasePart,BasePartAlt1,BasePartSplit16 { +@BassBoneName("T16PartHex") +@BassBoneAlt1Info(name="Dual-tone multi-frequency signaling", website="https://en.wikipedia.org/wiki/Dual-tone_multi-frequency_signaling") +public enum T16PartHex implements BassBone,BassBoneAlt1,BasePartSplit16 { - 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_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"), + PART_16("꜑","F","硫","sulfur", "D"), ; public static int LENGTH() { return values().length; }; - private final BaseFacetMap bfm = BaseFacetMap.newInstance(); - private static final String ALT_1_NAME = "Dual-tone multi-frequency signaling"; - private static final String ALT_1_WIKI = "https://en.wikipedia.org/wiki/Dual-tone_multi-frequency_signaling"; + private final BassBoneCoffin bbc = BassBoneCoffin.newInstance(); 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 T16PartHex(String idTone, String idLetter, String chinaKey, String chinaValue, String alt1Value) { - this.getBFM().putInit(BaseFacetKey.ID_TONE, idTone); - this.getBFM().putInit(BaseFacetKey.ID_LETTER, idLetter); - this.getBFM().putInit(BaseFacetKey.CHINA_KEY, chinaKey); - 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.getBBC().putInit(BassBoneStoreKey.ID_TONE, idTone); + this.getBBC().putInit(BassBoneStoreKey.ID_LETTER, idLetter); + this.getBBC().putInit(BassBoneStoreKey.CHINA_KEY, chinaKey); + this.getBBC().putInit(BassBoneStoreKey.CHINA_VALUE, chinaValue); + this.getBBC().putInit(BassBoneStoreKey.ALT_1_VALUE, alt1Value); } @Override - public BaseFacetMap getBFM() { - return bfm; + public BassBoneCoffin getBBC() { + return bbc; } public static void forEach(Consumer consumer) { diff --git a/numberxd/src/main/love/distributedrebirth/numberxd/base2t/T20PartScore.java b/numberxd/src/main/love/distributedrebirth/numberxd/base2t/T20PartScore.java index f1ea982c..354be949 100644 --- a/numberxd/src/main/love/distributedrebirth/numberxd/base2t/T20PartScore.java +++ b/numberxd/src/main/love/distributedrebirth/numberxd/base2t/T20PartScore.java @@ -6,17 +6,25 @@ import java.util.Map; import java.util.function.Consumer; import java.util.stream.Collectors; -import love.distributedrebirth.numberxd.base2t.facet.BasePart; -import love.distributedrebirth.numberxd.base2t.facet.BaseFacetKey; -import love.distributedrebirth.numberxd.base2t.facet.BaseFacetMap; -import love.distributedrebirth.numberxd.base2t.facet.BasePartAlt3; +import love.distributedrebirth.numberxd.base2t.bone.BassBone; +import love.distributedrebirth.numberxd.base2t.bone.BassBoneAlt1Info; +import love.distributedrebirth.numberxd.base2t.bone.BassBoneAlt2Info; +import love.distributedrebirth.numberxd.base2t.bone.BassBoneAlt3; +import love.distributedrebirth.numberxd.base2t.bone.BassBoneAlt3Info; +import love.distributedrebirth.numberxd.base2t.bone.BassBoneCoffin; +import love.distributedrebirth.numberxd.base2t.bone.BassBoneName; +import love.distributedrebirth.numberxd.base2t.bone.BassBoneStoreKey; /** * The distribution by 20. * * @author willemtsade ©Δ∞ 仙上主天 */ -public enum T20PartScore implements BasePart,BasePartAlt3 { +@BassBoneName("T20PartScore") +@BassBoneAlt1Info(name="Vigesimal", website="https://en.wikipedia.org/wiki/Vigesimal#Places") +@BassBoneAlt2Info(name="Vigesimal Alternative", website="https://en.wikipedia.org/wiki/Vigesimal#Places") +@BassBoneAlt3Info(name="Open Location Code", website="https://en.wikipedia.org/wiki/Open_Location_Code") +public enum T20PartScore implements BassBone,BassBoneAlt3 { PART_1 ("˥","Y", "尧","yotta","0","0","2"), PART_2 ("˦","Z", "泽","zetta","1","1","3"), @@ -41,13 +49,7 @@ public enum T20PartScore implements BasePart,BasePartAlt3 { ; public static int LENGTH() { return values().length; }; - private final BaseFacetMap bfm = BaseFacetMap.newInstance(); - private static final String ALT_1_NAME = "Vigesimal"; - private static final String ALT_1_WIKI = "https://en.wikipedia.org/wiki/Vigesimal#Places"; - private static final String ALT_2_NAME = "Vigesimal Alternative"; - private static final String ALT_2_WIKI = "https://en.wikipedia.org/wiki/Vigesimal#Places"; - private static final String ALT_3_NAME = "Open Location Code"; - private static final String ALT_3_WIKI = "https://en.wikipedia.org/wiki/Open_Location_Code"; + private final BassBoneCoffin bbc = BassBoneCoffin.newInstance(); 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( @@ -57,24 +59,18 @@ public enum T20PartScore implements BasePart,BasePartAlt3 { private T20PartScore(String idTone, String idLetter, String chinaKey, String chinaValue, String alt1Value, String alt2Value, String alt3Value) { - this.getBFM().putInit(BaseFacetKey.ID_TONE, idTone); - this.getBFM().putInit(BaseFacetKey.ID_LETTER, idLetter); - this.getBFM().putInit(BaseFacetKey.CHINA_KEY, chinaKey); - 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.getBBC().putInit(BassBoneStoreKey.ID_TONE, idTone); + this.getBBC().putInit(BassBoneStoreKey.ID_LETTER, idLetter); + this.getBBC().putInit(BassBoneStoreKey.CHINA_KEY, chinaKey); + this.getBBC().putInit(BassBoneStoreKey.CHINA_VALUE, chinaValue); + this.getBBC().putInit(BassBoneStoreKey.ALT_1_VALUE, alt1Value); + this.getBBC().putInit(BassBoneStoreKey.ALT_2_VALUE, alt2Value); + this.getBBC().putInit(BassBoneStoreKey.ALT_3_VALUE, alt3Value); } @Override - public BaseFacetMap getBFM() { - return bfm; + public BassBoneCoffin getBBC() { + return bbc; } public static void forEach(Consumer consumer) { diff --git a/numberxd/src/main/love/distributedrebirth/numberxd/base2t/T60Sexagesimal.java b/numberxd/src/main/love/distributedrebirth/numberxd/base2t/T60Sexagesimal.java index fdaf7670..0a6ca53d 100644 --- a/numberxd/src/main/love/distributedrebirth/numberxd/base2t/T60Sexagesimal.java +++ b/numberxd/src/main/love/distributedrebirth/numberxd/base2t/T60Sexagesimal.java @@ -6,16 +6,18 @@ import java.util.Map; import java.util.function.Consumer; import java.util.stream.Collectors; -import love.distributedrebirth.numberxd.base2t.facet.BasePart; -import love.distributedrebirth.numberxd.base2t.facet.BaseFacetKey; -import love.distributedrebirth.numberxd.base2t.facet.BaseFacetMap; +import love.distributedrebirth.numberxd.base2t.bone.BassBone; +import love.distributedrebirth.numberxd.base2t.bone.BassBoneCoffin; +import love.distributedrebirth.numberxd.base2t.bone.BassBoneName; +import love.distributedrebirth.numberxd.base2t.bone.BassBoneStoreKey; /** * The distribution by 60. * * @author willemtsade ©Δ∞ 仙上主天 */ -public enum T60Sexagesimal implements BasePart { +@BassBoneName("T60Sexagesimal") +public enum T60Sexagesimal implements BassBone { PART_1 ("˧˩˥","ια","牛","cow"), PART_2 ("˧˥˦","ιβ","鸡","chicken"), @@ -83,21 +85,21 @@ public enum T60Sexagesimal implements BasePart { ; public static int LENGTH() { return values().length; }; - private final BaseFacetMap bfm = BaseFacetMap.newInstance(); + private final BassBoneCoffin bfm = BassBoneCoffin.newInstance(); 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 T60Sexagesimal(String idTone, String idLetter, String chinaKey, String chinaValue) { - this.getBFM().putInit(BaseFacetKey.ID_TONE, idTone); - this.getBFM().putInit(BaseFacetKey.ID_LETTER, idLetter); - this.getBFM().putInit(BaseFacetKey.CHINA_KEY, chinaKey); - this.getBFM().putInit(BaseFacetKey.CHINA_VALUE, chinaValue); + this.getBBC().putInit(BassBoneStoreKey.ID_TONE, idTone); + this.getBBC().putInit(BassBoneStoreKey.ID_LETTER, idLetter); + this.getBBC().putInit(BassBoneStoreKey.CHINA_KEY, chinaKey); + this.getBBC().putInit(BassBoneStoreKey.CHINA_VALUE, chinaValue); } @Override - public BaseFacetMap getBFM() { + public BassBoneCoffin getBBC() { return bfm; } diff --git a/numberxd/src/main/love/distributedrebirth/numberxd/base2t/bone/BasePartShiftBits.java b/numberxd/src/main/love/distributedrebirth/numberxd/base2t/bone/BasePartShiftBits.java new file mode 100644 index 00000000..c2652ee5 --- /dev/null +++ b/numberxd/src/main/love/distributedrebirth/numberxd/base2t/bone/BasePartShiftBits.java @@ -0,0 +1,13 @@ +package love.distributedrebirth.numberxd.base2t.bone; + +/** + * + * + * @author willemtsade ©Δ∞ 仙上主天 + */ +public interface BasePartShiftBits extends BassBone { + + default Integer getShiftBits() { + return getBBC().getInteger(BassBoneStoreKey.SHIFT_BITS); + } +} diff --git a/numberxd/src/main/love/distributedrebirth/numberxd/base2t/facet/BasePartSplit16.java b/numberxd/src/main/love/distributedrebirth/numberxd/base2t/bone/BasePartSplit16.java similarity index 74% rename from numberxd/src/main/love/distributedrebirth/numberxd/base2t/facet/BasePartSplit16.java rename to numberxd/src/main/love/distributedrebirth/numberxd/base2t/bone/BasePartSplit16.java index 95931158..afdb9d3f 100644 --- a/numberxd/src/main/love/distributedrebirth/numberxd/base2t/facet/BasePartSplit16.java +++ b/numberxd/src/main/love/distributedrebirth/numberxd/base2t/bone/BasePartSplit16.java @@ -1,4 +1,4 @@ -package love.distributedrebirth.numberxd.base2t.facet; +package love.distributedrebirth.numberxd.base2t.bone; import love.distributedrebirth.numberxd.base2t.T02PartBinary; import love.distributedrebirth.numberxd.base2t.T04PartQuad; @@ -8,7 +8,7 @@ import love.distributedrebirth.numberxd.base2t.T04PartQuad; * * @author willemtsade ©Δ∞ 仙上主天 */ -public interface BasePartSplit16 extends BasePart { +public interface BasePartSplit16 extends BassBone { default T02PartBinary splitPartBinary(T04PartQuad part) { return T02PartBinary.values()[(ordinal() >> part.ordinal()) & 1]; diff --git a/numberxd/src/main/love/distributedrebirth/numberxd/base2t/facet/BasePartSplit4.java b/numberxd/src/main/love/distributedrebirth/numberxd/base2t/bone/BasePartSplit4.java similarity index 70% rename from numberxd/src/main/love/distributedrebirth/numberxd/base2t/facet/BasePartSplit4.java rename to numberxd/src/main/love/distributedrebirth/numberxd/base2t/bone/BasePartSplit4.java index f144d5bf..2bfd33f8 100644 --- a/numberxd/src/main/love/distributedrebirth/numberxd/base2t/facet/BasePartSplit4.java +++ b/numberxd/src/main/love/distributedrebirth/numberxd/base2t/bone/BasePartSplit4.java @@ -1,4 +1,4 @@ -package love.distributedrebirth.numberxd.base2t.facet; +package love.distributedrebirth.numberxd.base2t.bone; import love.distributedrebirth.numberxd.base2t.T02PartBinary; @@ -7,7 +7,7 @@ import love.distributedrebirth.numberxd.base2t.T02PartBinary; * * @author willemtsade ©Δ∞ 仙上主天 */ -public interface BasePartSplit4 extends BasePart { +public interface BasePartSplit4 extends BassBone { default T02PartBinary splitPartBinary(T02PartBinary part) { return T02PartBinary.values()[(ordinal() >> part.ordinal()) & 1]; diff --git a/numberxd/src/main/love/distributedrebirth/numberxd/base2t/facet/BasePartSplit6.java b/numberxd/src/main/love/distributedrebirth/numberxd/base2t/bone/BasePartSplit6.java similarity index 77% rename from numberxd/src/main/love/distributedrebirth/numberxd/base2t/facet/BasePartSplit6.java rename to numberxd/src/main/love/distributedrebirth/numberxd/base2t/bone/BasePartSplit6.java index 5deaab35..0d684c32 100644 --- a/numberxd/src/main/love/distributedrebirth/numberxd/base2t/facet/BasePartSplit6.java +++ b/numberxd/src/main/love/distributedrebirth/numberxd/base2t/bone/BasePartSplit6.java @@ -1,4 +1,4 @@ -package love.distributedrebirth.numberxd.base2t.facet; +package love.distributedrebirth.numberxd.base2t.bone; import love.distributedrebirth.numberxd.base2t.T02PartBinary; import love.distributedrebirth.numberxd.base2t.T03PartTrit; @@ -8,7 +8,7 @@ import love.distributedrebirth.numberxd.base2t.T03PartTrit; * * @author willemtsade ©Δ∞ 仙上主天 */ -public interface BasePartSplit6 extends BasePart { +public interface BasePartSplit6 extends BassBone { default T02PartBinary splitPartBinary() { return T02PartBinary.values()[ordinal() & 1]; diff --git a/numberxd/src/main/love/distributedrebirth/numberxd/base2t/facet/BasePartSplit8.java b/numberxd/src/main/love/distributedrebirth/numberxd/base2t/bone/BasePartSplit8.java similarity index 90% rename from numberxd/src/main/love/distributedrebirth/numberxd/base2t/facet/BasePartSplit8.java rename to numberxd/src/main/love/distributedrebirth/numberxd/base2t/bone/BasePartSplit8.java index ce17ae7f..db216168 100644 --- a/numberxd/src/main/love/distributedrebirth/numberxd/base2t/facet/BasePartSplit8.java +++ b/numberxd/src/main/love/distributedrebirth/numberxd/base2t/bone/BasePartSplit8.java @@ -1,4 +1,4 @@ -package love.distributedrebirth.numberxd.base2t.facet; +package love.distributedrebirth.numberxd.base2t.bone; import love.distributedrebirth.numberxd.base2t.T02PartBinary; import love.distributedrebirth.numberxd.base2t.T03PartTrit; diff --git a/numberxd/src/main/love/distributedrebirth/numberxd/base2t/bone/BassBone.java b/numberxd/src/main/love/distributedrebirth/numberxd/base2t/bone/BassBone.java new file mode 100644 index 00000000..9314c0e4 --- /dev/null +++ b/numberxd/src/main/love/distributedrebirth/numberxd/base2t/bone/BassBone.java @@ -0,0 +1,33 @@ +package love.distributedrebirth.numberxd.base2t.bone; + +/** + * + * + * @author willemtsade ©Δ∞ 仙上主天 + */ +public interface BassBone extends BassBoneStore { + + String name(); + + int ordinal(); + + default String staticBoneName() { + return getClass().getAnnotation(BassBoneName.class).value(); + } + + default String getIdentifierTone() { + return getBBC().getString(BassBoneStoreKey.ID_TONE); + } + + default String getIdentifierLetter() { + return getBBC().getString(BassBoneStoreKey.ID_LETTER); + } + + default String getChinaKey() { + return getBBC().getString(BassBoneStoreKey.CHINA_KEY); + } + + default String getChinaValue() { + return getBBC().getString(BassBoneStoreKey.CHINA_VALUE); + } +} diff --git a/numberxd/src/main/love/distributedrebirth/numberxd/base2t/bone/BassBoneAlt1.java b/numberxd/src/main/love/distributedrebirth/numberxd/base2t/bone/BassBoneAlt1.java new file mode 100644 index 00000000..c6080683 --- /dev/null +++ b/numberxd/src/main/love/distributedrebirth/numberxd/base2t/bone/BassBoneAlt1.java @@ -0,0 +1,21 @@ +package love.distributedrebirth.numberxd.base2t.bone; + +/** + * + * + * @author willemtsade ©Δ∞ 仙上主天 + */ +public interface BassBoneAlt1 extends BassBone { + + default String getAlt1Value() { + return getBBC().getString(BassBoneStoreKey.ALT_1_VALUE); + } + + default String staticAlt1Name() { + return getClass().getAnnotation(BassBoneAlt1Info.class).name(); + } + + default String staticAlt1Website() { + return getClass().getAnnotation(BassBoneAlt1Info.class).website(); + } +} diff --git a/numberxd/src/main/love/distributedrebirth/numberxd/base2t/bone/BassBoneAlt1Info.java b/numberxd/src/main/love/distributedrebirth/numberxd/base2t/bone/BassBoneAlt1Info.java new file mode 100644 index 00000000..3312eb14 --- /dev/null +++ b/numberxd/src/main/love/distributedrebirth/numberxd/base2t/bone/BassBoneAlt1Info.java @@ -0,0 +1,20 @@ +package love.distributedrebirth.numberxd.base2t.bone; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +/** + * Adds name and website for alt1 info. + * + * @author willemtsade ©Δ∞ 仙上主天 + */ +@Retention(RetentionPolicy.RUNTIME) +@Target({ElementType.TYPE}) +public @interface BassBoneAlt1Info { + + String name(); + + String website(); +} diff --git a/numberxd/src/main/love/distributedrebirth/numberxd/base2t/bone/BassBoneAlt2.java b/numberxd/src/main/love/distributedrebirth/numberxd/base2t/bone/BassBoneAlt2.java new file mode 100644 index 00000000..d5bc4c7f --- /dev/null +++ b/numberxd/src/main/love/distributedrebirth/numberxd/base2t/bone/BassBoneAlt2.java @@ -0,0 +1,21 @@ +package love.distributedrebirth.numberxd.base2t.bone; + +/** + * + * + * @author willemtsade ©Δ∞ 仙上主天 + */ +public interface BassBoneAlt2 extends BassBoneAlt1 { + + default String getAlt2Value() { + return getBBC().getString(BassBoneStoreKey.ALT_2_VALUE); + } + + default String staticAlt2Name() { + return getClass().getAnnotation(BassBoneAlt2Info.class).name(); + } + + default String staticAlt2Website() { + return getClass().getAnnotation(BassBoneAlt2Info.class).website(); + } +} diff --git a/numberxd/src/main/love/distributedrebirth/numberxd/base2t/bone/BassBoneAlt2Info.java b/numberxd/src/main/love/distributedrebirth/numberxd/base2t/bone/BassBoneAlt2Info.java new file mode 100644 index 00000000..72763f66 --- /dev/null +++ b/numberxd/src/main/love/distributedrebirth/numberxd/base2t/bone/BassBoneAlt2Info.java @@ -0,0 +1,20 @@ +package love.distributedrebirth.numberxd.base2t.bone; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +/** + * Adds name and website for alt2 info. + * + * @author willemtsade ©Δ∞ 仙上主天 + */ +@Retention(RetentionPolicy.RUNTIME) +@Target({ElementType.TYPE}) +public @interface BassBoneAlt2Info { + + String name(); + + String website(); +} diff --git a/numberxd/src/main/love/distributedrebirth/numberxd/base2t/bone/BassBoneAlt3.java b/numberxd/src/main/love/distributedrebirth/numberxd/base2t/bone/BassBoneAlt3.java new file mode 100644 index 00000000..89305491 --- /dev/null +++ b/numberxd/src/main/love/distributedrebirth/numberxd/base2t/bone/BassBoneAlt3.java @@ -0,0 +1,21 @@ +package love.distributedrebirth.numberxd.base2t.bone; + +/** + * + * + * @author willemtsade ©Δ∞ 仙上主天 + */ +public interface BassBoneAlt3 extends BassBoneAlt2 { + + default String getAlt3Value() { + return getBBC().getString(BassBoneStoreKey.ALT_3_VALUE); + } + + default String staticAlt3Name() { + return getClass().getAnnotation(BassBoneAlt3Info.class).name(); + } + + default String staticAlt3Website() { + return getClass().getAnnotation(BassBoneAlt3Info.class).website(); + } +} diff --git a/numberxd/src/main/love/distributedrebirth/numberxd/base2t/bone/BassBoneAlt3Info.java b/numberxd/src/main/love/distributedrebirth/numberxd/base2t/bone/BassBoneAlt3Info.java new file mode 100644 index 00000000..546e7f3d --- /dev/null +++ b/numberxd/src/main/love/distributedrebirth/numberxd/base2t/bone/BassBoneAlt3Info.java @@ -0,0 +1,20 @@ +package love.distributedrebirth.numberxd.base2t.bone; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +/** + * Adds name and website for alt3 info. + * + * @author willemtsade ©Δ∞ 仙上主天 + */ +@Retention(RetentionPolicy.RUNTIME) +@Target({ElementType.TYPE}) +public @interface BassBoneAlt3Info { + + String name(); + + String website(); +} diff --git a/numberxd/src/main/love/distributedrebirth/numberxd/base2t/bone/BassBoneAlt4.java b/numberxd/src/main/love/distributedrebirth/numberxd/base2t/bone/BassBoneAlt4.java new file mode 100644 index 00000000..f7033a46 --- /dev/null +++ b/numberxd/src/main/love/distributedrebirth/numberxd/base2t/bone/BassBoneAlt4.java @@ -0,0 +1,21 @@ +package love.distributedrebirth.numberxd.base2t.bone; + +/** + * + * + * @author willemtsade ©Δ∞ 仙上主天 + */ +public interface BassBoneAlt4 extends BassBoneAlt3 { + + default String getAlt4Value() { + return getBBC().getString(BassBoneStoreKey.ALT_4_VALUE); + } + + default String staticAlt4Name() { + return getClass().getAnnotation(BassBoneAlt4Info.class).name(); + } + + default String staticAlt4Website() { + return getClass().getAnnotation(BassBoneAlt4Info.class).website(); + } +} diff --git a/numberxd/src/main/love/distributedrebirth/numberxd/base2t/bone/BassBoneAlt4Info.java b/numberxd/src/main/love/distributedrebirth/numberxd/base2t/bone/BassBoneAlt4Info.java new file mode 100644 index 00000000..ccc5b2a6 --- /dev/null +++ b/numberxd/src/main/love/distributedrebirth/numberxd/base2t/bone/BassBoneAlt4Info.java @@ -0,0 +1,20 @@ +package love.distributedrebirth.numberxd.base2t.bone; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +/** + * Adds name and website for alt4 info. + * + * @author willemtsade ©Δ∞ 仙上主天 + */ +@Retention(RetentionPolicy.RUNTIME) +@Target({ElementType.TYPE}) +public @interface BassBoneAlt4Info { + + String name(); + + String website(); +} diff --git a/numberxd/src/main/love/distributedrebirth/numberxd/base2t/bone/BassBoneCoffin.java b/numberxd/src/main/love/distributedrebirth/numberxd/base2t/bone/BassBoneCoffin.java new file mode 100644 index 00000000..cd4f63f8 --- /dev/null +++ b/numberxd/src/main/love/distributedrebirth/numberxd/base2t/bone/BassBoneCoffin.java @@ -0,0 +1,43 @@ +package love.distributedrebirth.numberxd.base2t.bone; + +import java.util.HashMap; +import java.util.Map; + +public interface BassBoneCoffin { + + Object putInit(BassBoneStoreKey key, Object value); + + Object get(BassBoneStoreKey key); + + default String getString(BassBoneStoreKey key) { + return String.class.cast(get(key)); + } + + default Integer getInteger(BassBoneStoreKey key) { + return Integer.class.cast(get(key)); + } + + default Long getLong(BassBoneStoreKey key) { + return Long.class.cast(get(key)); + } + + default Boolean getBoolean(BassBoneStoreKey key) { + return Boolean.class.cast(get(key)); + } + + static BassBoneCoffin newInstance() { + return new BassBoneCoffin() { + final Map initMap = new HashMap<>(); + + @Override + public Object get(BassBoneStoreKey key) { + return initMap.get(key); + } + + @Override + public Object putInit(BassBoneStoreKey key, Object value) { + return initMap.put(key, value); + } + }; + } +} diff --git a/numberxd/src/main/love/distributedrebirth/numberxd/base2t/bone/BassBoneName.java b/numberxd/src/main/love/distributedrebirth/numberxd/base2t/bone/BassBoneName.java new file mode 100644 index 00000000..8f7945dd --- /dev/null +++ b/numberxd/src/main/love/distributedrebirth/numberxd/base2t/bone/BassBoneName.java @@ -0,0 +1,18 @@ +package love.distributedrebirth.numberxd.base2t.bone; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +/** + * Defines the bean name. + * + * @author willemtsade ©Δ∞ 仙上主天 + */ +@Retention(RetentionPolicy.RUNTIME) +@Target({ElementType.TYPE}) +public @interface BassBoneName { + + String value(); +} diff --git a/numberxd/src/main/love/distributedrebirth/numberxd/base2t/bone/BassBoneStore.java b/numberxd/src/main/love/distributedrebirth/numberxd/base2t/bone/BassBoneStore.java new file mode 100644 index 00000000..318c5697 --- /dev/null +++ b/numberxd/src/main/love/distributedrebirth/numberxd/base2t/bone/BassBoneStore.java @@ -0,0 +1,11 @@ +package love.distributedrebirth.numberxd.base2t.bone; + +/** + * + * + * @author willemtsade ©Δ∞ 仙上主天 + */ +public interface BassBoneStore { + + BassBoneCoffin getBBC(); +} diff --git a/numberxd/src/main/love/distributedrebirth/numberxd/base2t/facet/BaseFacetKey.java b/numberxd/src/main/love/distributedrebirth/numberxd/base2t/bone/BassBoneStoreKey.java similarity index 50% rename from numberxd/src/main/love/distributedrebirth/numberxd/base2t/facet/BaseFacetKey.java rename to numberxd/src/main/love/distributedrebirth/numberxd/base2t/bone/BassBoneStoreKey.java index 6fd92e1b..c059f3d0 100644 --- a/numberxd/src/main/love/distributedrebirth/numberxd/base2t/facet/BaseFacetKey.java +++ b/numberxd/src/main/love/distributedrebirth/numberxd/base2t/bone/BassBoneStoreKey.java @@ -1,11 +1,11 @@ -package love.distributedrebirth.numberxd.base2t.facet; +package love.distributedrebirth.numberxd.base2t.bone; /** * * * @author willemtsade ©Δ∞ 仙上主天 */ -public enum BaseFacetKey { +public enum BassBoneStoreKey { ID_TONE, ID_LETTER, @@ -14,16 +14,8 @@ public enum BaseFacetKey { SHIFT_BITS, ALT_1_VALUE, - ALT_1_NAME, - ALT_1_WIKI, ALT_2_VALUE, - ALT_2_NAME, - ALT_2_WIKI, ALT_3_VALUE, - ALT_3_NAME, - ALT_3_WIKI, ALT_4_VALUE, - ALT_4_NAME, - ALT_4_WIKI, ; } diff --git a/numberxd/src/main/love/distributedrebirth/numberxd/base2t/facet/BaseFacetMap.java b/numberxd/src/main/love/distributedrebirth/numberxd/base2t/facet/BaseFacetMap.java deleted file mode 100644 index 9d4bbe20..00000000 --- a/numberxd/src/main/love/distributedrebirth/numberxd/base2t/facet/BaseFacetMap.java +++ /dev/null @@ -1,43 +0,0 @@ -package love.distributedrebirth.numberxd.base2t.facet; - -import java.util.HashMap; -import java.util.Map; - -public interface BaseFacetMap { - - Object putInit(BaseFacetKey key, Object value); - - Object get(BaseFacetKey key); - - default String getString(BaseFacetKey key) { - return String.class.cast(get(key)); - } - - default Integer getInteger(BaseFacetKey key) { - return Integer.class.cast(get(key)); - } - - default Long getLong(BaseFacetKey key) { - return Long.class.cast(get(key)); - } - - default Boolean getBoolean(BaseFacetKey key) { - return Boolean.class.cast(get(key)); - } - - static BaseFacetMap newInstance() { - return new BaseFacetMap() { - final Map initMap = new HashMap<>(); - - @Override - public Object get(BaseFacetKey key) { - return initMap.get(key); - } - - @Override - public Object putInit(BaseFacetKey key, Object value) { - return initMap.put(key, value); - } - }; - } -} diff --git a/numberxd/src/main/love/distributedrebirth/numberxd/base2t/facet/BaseFacetStore.java b/numberxd/src/main/love/distributedrebirth/numberxd/base2t/facet/BaseFacetStore.java deleted file mode 100644 index 3f6027b1..00000000 --- a/numberxd/src/main/love/distributedrebirth/numberxd/base2t/facet/BaseFacetStore.java +++ /dev/null @@ -1,11 +0,0 @@ -package love.distributedrebirth.numberxd.base2t.facet; - -/** - * - * - * @author willemtsade ©Δ∞ 仙上主天 - */ -public interface BaseFacetStore { - - BaseFacetMap getBFM(); -} diff --git a/numberxd/src/main/love/distributedrebirth/numberxd/base2t/facet/BasePart.java b/numberxd/src/main/love/distributedrebirth/numberxd/base2t/facet/BasePart.java deleted file mode 100644 index 962ce1d0..00000000 --- a/numberxd/src/main/love/distributedrebirth/numberxd/base2t/facet/BasePart.java +++ /dev/null @@ -1,29 +0,0 @@ -package love.distributedrebirth.numberxd.base2t.facet; - -/** - * - * - * @author willemtsade ©Δ∞ 仙上主天 - */ -public interface BasePart extends BaseFacetStore { - - String name(); - - int ordinal(); - - default String getIdentifierTone() { - return getBFM().getString(BaseFacetKey.ID_TONE); - } - - default String getIdentifierLetter() { - return getBFM().getString(BaseFacetKey.ID_LETTER); - } - - default String getChinaKey() { - return getBFM().getString(BaseFacetKey.CHINA_KEY); - } - - default String getChinaValue() { - return getBFM().getString(BaseFacetKey.CHINA_VALUE); - } -} diff --git a/numberxd/src/main/love/distributedrebirth/numberxd/base2t/facet/BasePartAlt1.java b/numberxd/src/main/love/distributedrebirth/numberxd/base2t/facet/BasePartAlt1.java deleted file mode 100644 index c155e04b..00000000 --- a/numberxd/src/main/love/distributedrebirth/numberxd/base2t/facet/BasePartAlt1.java +++ /dev/null @@ -1,21 +0,0 @@ -package love.distributedrebirth.numberxd.base2t.facet; - -/** - * - * - * @author willemtsade ©Δ∞ 仙上主天 - */ -public interface BasePartAlt1 extends BasePart { - - default String getAlt1Value() { - return getBFM().getString(BaseFacetKey.ALT_1_VALUE); - } - - default String getAlt1Name() { - return getBFM().getString(BaseFacetKey.ALT_1_NAME); - } - - default String getAlt1Wiki() { - return getBFM().getString(BaseFacetKey.ALT_1_WIKI); - } -} diff --git a/numberxd/src/main/love/distributedrebirth/numberxd/base2t/facet/BasePartAlt2.java b/numberxd/src/main/love/distributedrebirth/numberxd/base2t/facet/BasePartAlt2.java deleted file mode 100644 index b13d0059..00000000 --- a/numberxd/src/main/love/distributedrebirth/numberxd/base2t/facet/BasePartAlt2.java +++ /dev/null @@ -1,21 +0,0 @@ -package love.distributedrebirth.numberxd.base2t.facet; - -/** - * - * - * @author willemtsade ©Δ∞ 仙上主天 - */ -public interface BasePartAlt2 extends BasePartAlt1 { - - default String getAlt2Value() { - return getBFM().getString(BaseFacetKey.ALT_2_VALUE); - } - - default String getAlt2Name() { - return getBFM().getString(BaseFacetKey.ALT_2_NAME); - } - - default String getAlt2Wiki() { - return getBFM().getString(BaseFacetKey.ALT_2_WIKI); - } -} diff --git a/numberxd/src/main/love/distributedrebirth/numberxd/base2t/facet/BasePartAlt3.java b/numberxd/src/main/love/distributedrebirth/numberxd/base2t/facet/BasePartAlt3.java deleted file mode 100644 index 25900eb6..00000000 --- a/numberxd/src/main/love/distributedrebirth/numberxd/base2t/facet/BasePartAlt3.java +++ /dev/null @@ -1,21 +0,0 @@ -package love.distributedrebirth.numberxd.base2t.facet; - -/** - * - * - * @author willemtsade ©Δ∞ 仙上主天 - */ -public interface BasePartAlt3 extends BasePartAlt2 { - - default String getAlt3Value() { - return getBFM().getString(BaseFacetKey.ALT_3_VALUE); - } - - default String getAlt3Name() { - return getBFM().getString(BaseFacetKey.ALT_3_NAME); - } - - default String getAlt3Wiki() { - return getBFM().getString(BaseFacetKey.ALT_3_WIKI); - } -} diff --git a/numberxd/src/main/love/distributedrebirth/numberxd/base2t/facet/BasePartAlt4.java b/numberxd/src/main/love/distributedrebirth/numberxd/base2t/facet/BasePartAlt4.java deleted file mode 100644 index fe1d80c4..00000000 --- a/numberxd/src/main/love/distributedrebirth/numberxd/base2t/facet/BasePartAlt4.java +++ /dev/null @@ -1,21 +0,0 @@ -package love.distributedrebirth.numberxd.base2t.facet; - -/** - * - * - * @author willemtsade ©Δ∞ 仙上主天 - */ -public interface BasePartAlt4 extends BasePartAlt3 { - - default String getAlt4Value() { - return getBFM().getString(BaseFacetKey.ALT_4_VALUE); - } - - default String getAlt4Name() { - return getBFM().getString(BaseFacetKey.ALT_4_NAME); - } - - default String getAlt4Wiki() { - return getBFM().getString(BaseFacetKey.ALT_4_WIKI); - } -} diff --git a/numberxd/src/main/love/distributedrebirth/numberxd/base2t/facet/BasePartShiftBits.java b/numberxd/src/main/love/distributedrebirth/numberxd/base2t/facet/BasePartShiftBits.java deleted file mode 100644 index f64b1d82..00000000 --- a/numberxd/src/main/love/distributedrebirth/numberxd/base2t/facet/BasePartShiftBits.java +++ /dev/null @@ -1,13 +0,0 @@ -package love.distributedrebirth.numberxd.base2t.facet; - -/** - * - * - * @author willemtsade ©Δ∞ 仙上主天 - */ -public interface BasePartShiftBits extends BasePart { - - default Integer getShiftBits() { - return getBFM().getInteger(BaseFacetKey.SHIFT_BITS); - } -} diff --git a/numberxd/src/test/love/distributedrebirth/numberxd/base2t/BasePartFactoryTest.java b/numberxd/src/test/love/distributedrebirth/numberxd/base2t/BasePartFactoryTest.java index dc8b89c8..0037e4fc 100644 --- a/numberxd/src/test/love/distributedrebirth/numberxd/base2t/BasePartFactoryTest.java +++ b/numberxd/src/test/love/distributedrebirth/numberxd/base2t/BasePartFactoryTest.java @@ -6,7 +6,7 @@ import java.util.Map; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; -import love.distributedrebirth.numberxd.base2t.facet.BasePart; +import love.distributedrebirth.numberxd.base2t.bone.BassBone; /** * @@ -27,7 +27,7 @@ public class BasePartFactoryTest { public void testGlobalChinaKeyMap() { Map global = new HashMap<>(); for (int base:BasePartFactory.getSupportedBases()) { - for (BasePart part:BasePartFactory.buildBasePartsByBase(base)) { + for (BassBone part:BasePartFactory.buildBassBonesByBase(base)) { Assertions.assertFalse(global.containsKey(part.getChinaKey())); global.put(part.getChinaKey(), part.getChinaValue()); } @@ -39,7 +39,7 @@ public class BasePartFactoryTest { public void testGlobalChinaValueMap() { Map global = new HashMap<>(); for (int base:BasePartFactory.getSupportedBases()) { - for (BasePart part:BasePartFactory.buildBasePartsByBase(base)) { + for (BassBone part:BasePartFactory.buildBassBonesByBase(base)) { Assertions.assertFalse(global.containsKey(part.getChinaValue())); global.put(part.getChinaValue(), part.getChinaValue()); } @@ -52,7 +52,7 @@ public class BasePartFactoryTest { boolean duplicate = false; Map global = new HashMap<>(); for (int base:BasePartFactory.getSupportedBases()) { - for (BasePart part:BasePartFactory.buildBasePartsByBase(base)) { + for (BassBone part:BasePartFactory.buildBassBonesByBase(base)) { if (global.containsKey(part.getIdentifierTone())) { duplicate = true; break; @@ -69,7 +69,7 @@ public class BasePartFactoryTest { boolean duplicate = false; Map global = new HashMap<>(); for (int base:BasePartFactory.getSupportedBases()) { - for (BasePart part:BasePartFactory.buildBasePartsByBase(base)) { + for (BassBone part:BasePartFactory.buildBassBonesByBase(base)) { if (global.containsKey(part.getIdentifierLetter())) { duplicate = true; break; diff --git a/numberxd/src/test/love/distributedrebirth/numberxd/base2t/T04PartQuadTest.java b/numberxd/src/test/love/distributedrebirth/numberxd/base2t/T04PartQuadTest.java index f1092d9e..d069a4fd 100644 --- a/numberxd/src/test/love/distributedrebirth/numberxd/base2t/T04PartQuadTest.java +++ b/numberxd/src/test/love/distributedrebirth/numberxd/base2t/T04PartQuadTest.java @@ -18,8 +18,8 @@ public class T04PartQuadTest { Assertions.assertNotNull(value.getChinaKey()); Assertions.assertNotNull(value.getChinaValue()); Assertions.assertNotNull(value.getAlt1Value()); - Assertions.assertNotNull(value.getAlt1Name()); - Assertions.assertNotNull(value.getAlt1Wiki()); + Assertions.assertNotNull(value.staticAlt1Name()); + Assertions.assertNotNull(value.staticAlt1Website()); } } diff --git a/numberxd/src/test/love/distributedrebirth/numberxd/base2t/T06PartSeximalTest.java b/numberxd/src/test/love/distributedrebirth/numberxd/base2t/T06PartSeximalTest.java index 6154e554..ed78e688 100644 --- a/numberxd/src/test/love/distributedrebirth/numberxd/base2t/T06PartSeximalTest.java +++ b/numberxd/src/test/love/distributedrebirth/numberxd/base2t/T06PartSeximalTest.java @@ -18,8 +18,8 @@ public class T06PartSeximalTest { Assertions.assertNotNull(value.getChinaKey()); Assertions.assertNotNull(value.getChinaValue()); Assertions.assertNotNull(value.getAlt1Value()); - Assertions.assertNotNull(value.getAlt1Name()); - Assertions.assertNotNull(value.getAlt1Wiki()); + Assertions.assertNotNull(value.staticAlt1Name()); + Assertions.assertNotNull(value.staticAlt1Website()); } } diff --git a/numberxd/src/test/love/distributedrebirth/numberxd/base2t/T07PartPlanItTest.java b/numberxd/src/test/love/distributedrebirth/numberxd/base2t/T07PartPlanItTest.java index 66de6aaf..4e6dbe03 100644 --- a/numberxd/src/test/love/distributedrebirth/numberxd/base2t/T07PartPlanItTest.java +++ b/numberxd/src/test/love/distributedrebirth/numberxd/base2t/T07PartPlanItTest.java @@ -18,8 +18,8 @@ public class T07PartPlanItTest { Assertions.assertNotNull(value.getChinaKey()); Assertions.assertNotNull(value.getChinaValue()); Assertions.assertNotNull(value.getAlt1Value()); - Assertions.assertNotNull(value.getAlt1Name()); - Assertions.assertNotNull(value.getAlt1Wiki()); + Assertions.assertNotNull(value.staticAlt1Name()); + Assertions.assertNotNull(value.staticAlt1Website()); } } diff --git a/numberxd/src/test/love/distributedrebirth/numberxd/base2t/T08PartOctalTest.java b/numberxd/src/test/love/distributedrebirth/numberxd/base2t/T08PartOctalTest.java index 25d014eb..1a09a4b2 100644 --- a/numberxd/src/test/love/distributedrebirth/numberxd/base2t/T08PartOctalTest.java +++ b/numberxd/src/test/love/distributedrebirth/numberxd/base2t/T08PartOctalTest.java @@ -18,11 +18,11 @@ public class T08PartOctalTest { Assertions.assertNotNull(value.getChinaKey()); Assertions.assertNotNull(value.getChinaValue()); Assertions.assertNotNull(value.getAlt1Value()); - Assertions.assertNotNull(value.getAlt1Name()); - Assertions.assertNotNull(value.getAlt1Wiki()); + Assertions.assertNotNull(value.staticAlt1Name()); + Assertions.assertNotNull(value.staticAlt1Website()); Assertions.assertNotNull(value.getAlt2Value()); - Assertions.assertNotNull(value.getAlt2Name()); - Assertions.assertNotNull(value.getAlt2Wiki()); + Assertions.assertNotNull(value.staticAlt2Name()); + Assertions.assertNotNull(value.staticAlt2Website()); } } diff --git a/numberxd/src/test/love/distributedrebirth/numberxd/base2t/T12PartUncialTest.java b/numberxd/src/test/love/distributedrebirth/numberxd/base2t/T12PartUncialTest.java index c0b24053..6d8ae03b 100644 --- a/numberxd/src/test/love/distributedrebirth/numberxd/base2t/T12PartUncialTest.java +++ b/numberxd/src/test/love/distributedrebirth/numberxd/base2t/T12PartUncialTest.java @@ -18,8 +18,8 @@ public class T12PartUncialTest { Assertions.assertNotNull(value.getChinaKey()); Assertions.assertNotNull(value.getChinaValue()); Assertions.assertNotNull(value.getAlt1Value()); - Assertions.assertNotNull(value.getAlt1Name()); - Assertions.assertNotNull(value.getAlt1Wiki()); + Assertions.assertNotNull(value.staticAlt1Name()); + Assertions.assertNotNull(value.staticAlt1Website()); } } diff --git a/numberxd/src/test/love/distributedrebirth/numberxd/base2t/T16PartHexTest.java b/numberxd/src/test/love/distributedrebirth/numberxd/base2t/T16PartHexTest.java index 9f6619c0..5fda3c2a 100644 --- a/numberxd/src/test/love/distributedrebirth/numberxd/base2t/T16PartHexTest.java +++ b/numberxd/src/test/love/distributedrebirth/numberxd/base2t/T16PartHexTest.java @@ -18,8 +18,8 @@ public class T16PartHexTest { Assertions.assertNotNull(value.getChinaKey()); Assertions.assertNotNull(value.getChinaValue()); Assertions.assertNotNull(value.getAlt1Value()); - Assertions.assertNotNull(value.getAlt1Name()); - Assertions.assertNotNull(value.getAlt1Wiki()); + Assertions.assertNotNull(value.staticAlt1Name()); + Assertions.assertNotNull(value.staticAlt1Website()); } } diff --git a/numberxd/src/test/love/distributedrebirth/numberxd/base2t/T20PartScoreTest.java b/numberxd/src/test/love/distributedrebirth/numberxd/base2t/T20PartScoreTest.java index 011a324f..635a5f8c 100644 --- a/numberxd/src/test/love/distributedrebirth/numberxd/base2t/T20PartScoreTest.java +++ b/numberxd/src/test/love/distributedrebirth/numberxd/base2t/T20PartScoreTest.java @@ -18,8 +18,8 @@ public class T20PartScoreTest { Assertions.assertNotNull(value.getChinaKey()); Assertions.assertNotNull(value.getChinaValue()); Assertions.assertNotNull(value.getAlt1Value()); - Assertions.assertNotNull(value.getAlt1Name()); - Assertions.assertNotNull(value.getAlt1Wiki()); + Assertions.assertNotNull(value.staticAlt1Name()); + Assertions.assertNotNull(value.staticAlt1Website()); } }