Moved to bass bone code

This commit is contained in:
Willem Cazander 2022-02-01 16:27:06 +01:00
parent c0ef8abc03
commit efc2bc74a2
49 changed files with 578 additions and 493 deletions

View file

@ -11,11 +11,11 @@ import imgui.type.ImInt;
import love.distributedrebirth.demo4d.Demo4DMain; import love.distributedrebirth.demo4d.Demo4DMain;
import love.distributedrebirth.demo4d.ImGuiRendererMain; import love.distributedrebirth.demo4d.ImGuiRendererMain;
import love.distributedrebirth.numberxd.base2t.BasePartFactory; import love.distributedrebirth.numberxd.base2t.BasePartFactory;
import love.distributedrebirth.numberxd.base2t.facet.BasePart; import love.distributedrebirth.numberxd.base2t.bone.BassBone;
import love.distributedrebirth.numberxd.base2t.facet.BasePartAlt1; import love.distributedrebirth.numberxd.base2t.bone.BassBoneAlt1;
import love.distributedrebirth.numberxd.base2t.facet.BasePartAlt2; import love.distributedrebirth.numberxd.base2t.bone.BassBoneAlt2;
import love.distributedrebirth.numberxd.base2t.facet.BasePartAlt3; import love.distributedrebirth.numberxd.base2t.bone.BassBoneAlt3;
import love.distributedrebirth.numberxd.base2t.facet.BasePartAlt4; import love.distributedrebirth.numberxd.base2t.bone.BassBoneAlt4;
/** /**
* *
@ -48,7 +48,7 @@ public class BasePartRenderer extends ImGuiRendererMain {
ImGui.combo("Type", selectedBasePart, bases.toArray(items)); ImGui.combo("Type", selectedBasePart, bases.toArray(items));
String selectedItem = items[selectedBasePart.get()]; String selectedItem = items[selectedBasePart.get()];
Integer baseNumber = Integer.valueOf(selectedItem); 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; int flags = ImGuiTableFlags.ScrollX | ImGuiTableFlags.RowBg | ImGuiTableFlags.BordersOuter | ImGuiTableFlags.BordersV;
ImGui.beginTable("base-part", 10, flags); ImGui.beginTable("base-part", 10, flags);
@ -64,7 +64,7 @@ public class BasePartRenderer extends ImGuiRendererMain {
ImGui.tableSetupColumn("Alt4"); ImGui.tableSetupColumn("Alt4");
ImGui.tableHeadersRow(); ImGui.tableHeadersRow();
for (BasePart part:baseParts) { for (BassBone part:baseParts) {
ImGui.tableNextRow(); ImGui.tableNextRow();
ImGui.tableNextColumn(); ImGui.tableNextColumn();
ImGui.text(part.name()); ImGui.text(part.name());
@ -80,26 +80,26 @@ public class BasePartRenderer extends ImGuiRendererMain {
ImGui.text(part.getChinaValue()); ImGui.text(part.getChinaValue());
ImGui.tableNextColumn(); ImGui.tableNextColumn();
if (part instanceof BasePartAlt1) { if (part instanceof BassBoneAlt1) {
ImGui.text(BasePartAlt1.class.cast(part).getAlt1Value()); ImGui.text(BassBoneAlt1.class.cast(part).getAlt1Value());
} else { } else {
ImGui.text(""); ImGui.text("");
} }
ImGui.tableNextColumn(); ImGui.tableNextColumn();
if (part instanceof BasePartAlt2) { if (part instanceof BassBoneAlt2) {
ImGui.text(BasePartAlt2.class.cast(part).getAlt2Value()); ImGui.text(BassBoneAlt2.class.cast(part).getAlt2Value());
} else { } else {
ImGui.text(""); ImGui.text("");
} }
ImGui.tableNextColumn(); ImGui.tableNextColumn();
if (part instanceof BasePartAlt3) { if (part instanceof BassBoneAlt3) {
ImGui.text(BasePartAlt3.class.cast(part).getAlt3Value()); ImGui.text(BassBoneAlt3.class.cast(part).getAlt3Value());
} else { } else {
ImGui.text(""); ImGui.text("");
} }
ImGui.tableNextColumn(); ImGui.tableNextColumn();
if (part instanceof BasePartAlt4) { if (part instanceof BassBoneAlt4) {
ImGui.text(BasePartAlt4.class.cast(part).getAlt4Value()); ImGui.text(BassBoneAlt4.class.cast(part).getAlt4Value());
} else { } else {
ImGui.text(""); ImGui.text("");
} }

View file

@ -1,6 +1,6 @@
package love.distributedrebirth.numberxd.base2t; package love.distributedrebirth.numberxd.base2t;
import love.distributedrebirth.numberxd.base2t.facet.BasePart; import love.distributedrebirth.numberxd.base2t.bone.BassBone;
public final class BasePartFactory { public final class BasePartFactory {
@ -10,7 +10,7 @@ public final class BasePartFactory {
return SUPPORTED_BASES; return SUPPORTED_BASES;
} }
public static BasePart[] buildBasePartsByBase(int base) { public static BassBone[] buildBassBonesByBase(int base) {
switch (base) { switch (base) {
case 2: case 2:
return T02PartBinary.values(); return T02PartBinary.values();

View file

@ -6,38 +6,40 @@ import java.util.Map;
import java.util.function.Consumer; import java.util.function.Consumer;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import love.distributedrebirth.numberxd.base2t.facet.BasePart; import love.distributedrebirth.numberxd.base2t.bone.BassBone;
import love.distributedrebirth.numberxd.base2t.facet.BaseFacetKey; import love.distributedrebirth.numberxd.base2t.bone.BassBoneCoffin;
import love.distributedrebirth.numberxd.base2t.facet.BaseFacetMap; import love.distributedrebirth.numberxd.base2t.bone.BassBoneName;
import love.distributedrebirth.numberxd.base2t.bone.BassBoneStoreKey;
/** /**
* The distribution by 2. * The distribution by 2.
* *
* @author willemtsade ©Δ 仙上主天 * @author willemtsade ©Δ 仙上主天
*/ */
public enum T02PartBinary implements BasePart { @BassBoneName("T02PartBinary")
public enum T02PartBinary implements BassBone {
PART_1("˧","0", "", "low"), PART_1("˧","0", "", "low"),
PART_2("","1", "", "high"), PART_2("","1", "", "high"),
; ;
public static int LENGTH() { return values().length; }; public static int LENGTH() { return values().length; };
private final BaseFacetMap bfm = BaseFacetMap.newInstance(); private final BassBoneCoffin bbc = BassBoneCoffin.newInstance();
private static final Map<String, T02PartBinary> TONE_MAP = Collections.unmodifiableMap( private static final Map<String, T02PartBinary> TONE_MAP = Collections.unmodifiableMap(
Arrays.asList(values()).stream().collect(Collectors.toMap(v -> v.getIdentifierTone(), v -> v))); Arrays.asList(values()).stream().collect(Collectors.toMap(v -> v.getIdentifierTone(), v -> v)));
private static final Map<String, T02PartBinary> CHINA_MAP = Collections.unmodifiableMap( private static final Map<String, T02PartBinary> CHINA_MAP = Collections.unmodifiableMap(
Arrays.asList(values()).stream().collect(Collectors.toMap(v -> v.getChinaKey(), v -> v))); Arrays.asList(values()).stream().collect(Collectors.toMap(v -> v.getChinaKey(), v -> v)));
private T02PartBinary(String idTone, String idLetter, String chinaKey, String chinaValue) { private T02PartBinary(String idTone, String idLetter, String chinaKey, String chinaValue) {
this.getBFM().putInit(BaseFacetKey.ID_TONE, idTone); this.getBBC().putInit(BassBoneStoreKey.ID_TONE, idTone);
this.getBFM().putInit(BaseFacetKey.ID_LETTER, idLetter); this.getBBC().putInit(BassBoneStoreKey.ID_LETTER, idLetter);
this.getBFM().putInit(BaseFacetKey.CHINA_KEY, chinaKey); this.getBBC().putInit(BassBoneStoreKey.CHINA_KEY, chinaKey);
this.getBFM().putInit(BaseFacetKey.CHINA_VALUE, chinaValue); this.getBBC().putInit(BassBoneStoreKey.CHINA_VALUE, chinaValue);
} }
@Override @Override
public BaseFacetMap getBFM() { public BassBoneCoffin getBBC() {
return bfm; return bbc;
} }
public static void forEach(Consumer<T02PartBinary> consumer) { public static void forEach(Consumer<T02PartBinary> consumer) {

View file

@ -6,16 +6,18 @@ import java.util.Map;
import java.util.function.Consumer; import java.util.function.Consumer;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import love.distributedrebirth.numberxd.base2t.facet.BasePart; import love.distributedrebirth.numberxd.base2t.bone.BassBone;
import love.distributedrebirth.numberxd.base2t.facet.BaseFacetKey; import love.distributedrebirth.numberxd.base2t.bone.BassBoneCoffin;
import love.distributedrebirth.numberxd.base2t.facet.BaseFacetMap; import love.distributedrebirth.numberxd.base2t.bone.BassBoneName;
import love.distributedrebirth.numberxd.base2t.bone.BassBoneStoreKey;
/** /**
* The distribution by 3. * The distribution by 3.
* *
* @author willemtsade ©Δ 仙上主天 * @author willemtsade ©Δ 仙上主天
*/ */
public enum T03PartTrit implements BasePart { @BassBoneName("T03PartTrit")
public enum T03PartTrit implements BassBone {
PART_1("˦","0","","1"), PART_1("˦","0","","1"),
PART_2("˧","1","","2"), PART_2("˧","1","","2"),
@ -23,22 +25,22 @@ public enum T03PartTrit implements BasePart {
; ;
public static int LENGTH() { return values().length; }; public static int LENGTH() { return values().length; };
private final BaseFacetMap bfm = BaseFacetMap.newInstance(); private final BassBoneCoffin bbc = BassBoneCoffin.newInstance();
private static final Map<String, T03PartTrit> TONE_MAP = Collections.unmodifiableMap( private static final Map<String, T03PartTrit> TONE_MAP = Collections.unmodifiableMap(
Arrays.asList(values()).stream().collect(Collectors.toMap(v -> v.getIdentifierTone(), v -> v))); Arrays.asList(values()).stream().collect(Collectors.toMap(v -> v.getIdentifierTone(), v -> v)));
private static final Map<String, T03PartTrit> CHINA_MAP = Collections.unmodifiableMap( private static final Map<String, T03PartTrit> CHINA_MAP = Collections.unmodifiableMap(
Arrays.asList(values()).stream().collect(Collectors.toMap(v -> v.getChinaKey(), v -> v))); Arrays.asList(values()).stream().collect(Collectors.toMap(v -> v.getChinaKey(), v -> v)));
private T03PartTrit(String idTone, String idLetter, String chinaKey, String chinaValue) { private T03PartTrit(String idTone, String idLetter, String chinaKey, String chinaValue) {
this.getBFM().putInit(BaseFacetKey.ID_TONE, idTone); this.getBBC().putInit(BassBoneStoreKey.ID_TONE, idTone);
this.getBFM().putInit(BaseFacetKey.ID_LETTER, idLetter); this.getBBC().putInit(BassBoneStoreKey.ID_LETTER, idLetter);
this.getBFM().putInit(BaseFacetKey.CHINA_KEY, chinaKey); this.getBBC().putInit(BassBoneStoreKey.CHINA_KEY, chinaKey);
this.getBFM().putInit(BaseFacetKey.CHINA_VALUE, chinaValue); this.getBBC().putInit(BassBoneStoreKey.CHINA_VALUE, chinaValue);
} }
@Override @Override
public BaseFacetMap getBFM() { public BassBoneCoffin getBBC() {
return bfm; return bbc;
} }
public static void forEach(Consumer<T03PartTrit> consumer) { public static void forEach(Consumer<T03PartTrit> consumer) {

View file

@ -6,18 +6,22 @@ import java.util.Map;
import java.util.function.Consumer; import java.util.function.Consumer;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import love.distributedrebirth.numberxd.base2t.facet.BasePart; import love.distributedrebirth.numberxd.base2t.bone.BasePartSplit4;
import love.distributedrebirth.numberxd.base2t.facet.BaseFacetKey; import love.distributedrebirth.numberxd.base2t.bone.BassBone;
import love.distributedrebirth.numberxd.base2t.facet.BaseFacetMap; import love.distributedrebirth.numberxd.base2t.bone.BassBoneAlt1;
import love.distributedrebirth.numberxd.base2t.facet.BasePartAlt1; import love.distributedrebirth.numberxd.base2t.bone.BassBoneAlt1Info;
import love.distributedrebirth.numberxd.base2t.facet.BasePartSplit4; 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. * The distribution by 4.
* *
* @author willemtsade ©Δ 仙上主天 * @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_1("˥","0","","north","N"),
PART_2("","1","","east", "E"), PART_2("","1","","east", "E"),
@ -26,27 +30,23 @@ public enum T04PartQuad implements BasePart,BasePartAlt1,BasePartSplit4 {
; ;
public static int LENGTH() { return values().length; }; public static int LENGTH() { return values().length; };
private final BaseFacetMap bfm = BaseFacetMap.newInstance(); private final BassBoneCoffin bbc = BassBoneCoffin.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 static final Map<String, T04PartQuad> TONE_MAP = Collections.unmodifiableMap( private static final Map<String, T04PartQuad> TONE_MAP = Collections.unmodifiableMap(
Arrays.asList(values()).stream().collect(Collectors.toMap(v -> v.getIdentifierTone(), v -> v))); Arrays.asList(values()).stream().collect(Collectors.toMap(v -> v.getIdentifierTone(), v -> v)));
private static final Map<String, T04PartQuad> CHINA_MAP = Collections.unmodifiableMap( private static final Map<String, T04PartQuad> CHINA_MAP = Collections.unmodifiableMap(
Arrays.asList(values()).stream().collect(Collectors.toMap(v -> v.getChinaKey(), v -> v))); Arrays.asList(values()).stream().collect(Collectors.toMap(v -> v.getChinaKey(), v -> v)));
private T04PartQuad(String idTone, String idLetter, String chinaKey, String chinaValue, String alt1Value) { private T04PartQuad(String idTone, String idLetter, String chinaKey, String chinaValue, String alt1Value) {
this.getBFM().putInit(BaseFacetKey.ID_TONE, idTone); this.getBBC().putInit(BassBoneStoreKey.ID_TONE, idTone);
this.getBFM().putInit(BaseFacetKey.ID_LETTER, idLetter); this.getBBC().putInit(BassBoneStoreKey.ID_LETTER, idLetter);
this.getBFM().putInit(BaseFacetKey.CHINA_KEY, chinaKey); this.getBBC().putInit(BassBoneStoreKey.CHINA_KEY, chinaKey);
this.getBFM().putInit(BaseFacetKey.CHINA_VALUE, chinaValue); this.getBBC().putInit(BassBoneStoreKey.CHINA_VALUE, chinaValue);
this.getBFM().putInit(BaseFacetKey.ALT_1_VALUE, alt1Value); this.getBBC().putInit(BassBoneStoreKey.ALT_1_VALUE, alt1Value);
this.getBFM().putInit(BaseFacetKey.ALT_1_NAME, ALT_1_NAME);
this.getBFM().putInit(BaseFacetKey.ALT_1_WIKI, ALT_1_WIKI);
} }
@Override @Override
public BaseFacetMap getBFM() { public BassBoneCoffin getBBC() {
return bfm; return bbc;
} }
public static void forEach(Consumer<T04PartQuad> consumer) { public static void forEach(Consumer<T04PartQuad> consumer) {

View file

@ -6,17 +6,23 @@ import java.util.Map;
import java.util.function.Consumer; import java.util.function.Consumer;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import love.distributedrebirth.numberxd.base2t.facet.BasePart; import love.distributedrebirth.numberxd.base2t.bone.BassBone;
import love.distributedrebirth.numberxd.base2t.facet.BasePartAlt2; import love.distributedrebirth.numberxd.base2t.bone.BassBoneAlt1Info;
import love.distributedrebirth.numberxd.base2t.facet.BaseFacetKey; import love.distributedrebirth.numberxd.base2t.bone.BassBoneAlt2;
import love.distributedrebirth.numberxd.base2t.facet.BaseFacetMap; 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. * The distribution by 5 called Wuxing.
* *
* @author willemtsade ©Δ 仙上主天 * @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_1("˥","0","","fire", "EI","heile"),
PART_2("˦","1","","water","U", "hudor"), PART_2("˦","1","","water","U", "hudor"),
@ -26,32 +32,24 @@ public enum T05PartPental implements BasePart,BasePartAlt2 {
; ;
public static int LENGTH() { return values().length; }; public static int LENGTH() { return values().length; };
private static final String ALT_1_NAME = "Pentagram"; private final BassBoneCoffin bbc = BassBoneCoffin.newInstance();
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 static final Map<String, T05PartPental> TONE_MAP = Collections.unmodifiableMap( private static final Map<String, T05PartPental> TONE_MAP = Collections.unmodifiableMap(
Arrays.asList(values()).stream().collect(Collectors.toMap(v -> v.getIdentifierTone(), v -> v))); Arrays.asList(values()).stream().collect(Collectors.toMap(v -> v.getIdentifierTone(), v -> v)));
private static final Map<String, T05PartPental> CHINA_MAP = Collections.unmodifiableMap( private static final Map<String, T05PartPental> CHINA_MAP = Collections.unmodifiableMap(
Arrays.asList(values()).stream().collect(Collectors.toMap(v -> v.getChinaKey(), v -> v))); Arrays.asList(values()).stream().collect(Collectors.toMap(v -> v.getChinaKey(), v -> v)));
private T05PartPental(String idTone, String idLetter, String chinaKey, String chinaValue, String alt1Value, String alt2Value) { private T05PartPental(String idTone, String idLetter, String chinaKey, String chinaValue, String alt1Value, String alt2Value) {
this.getBFM().putInit(BaseFacetKey.ID_TONE, idTone); this.getBBC().putInit(BassBoneStoreKey.ID_TONE, idTone);
this.getBFM().putInit(BaseFacetKey.ID_LETTER, idLetter); this.getBBC().putInit(BassBoneStoreKey.ID_LETTER, idLetter);
this.getBFM().putInit(BaseFacetKey.CHINA_KEY, chinaKey); this.getBBC().putInit(BassBoneStoreKey.CHINA_KEY, chinaKey);
this.getBFM().putInit(BaseFacetKey.CHINA_VALUE, chinaValue); this.getBBC().putInit(BassBoneStoreKey.CHINA_VALUE, chinaValue);
this.getBFM().putInit(BaseFacetKey.ALT_1_VALUE, alt1Value); this.getBBC().putInit(BassBoneStoreKey.ALT_1_VALUE, alt1Value);
this.getBFM().putInit(BaseFacetKey.ALT_1_NAME, ALT_1_NAME); this.getBBC().putInit(BassBoneStoreKey.ALT_2_VALUE, alt2Value);
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);
} }
@Override @Override
public BaseFacetMap getBFM() { public BassBoneCoffin getBBC() {
return bfm; return bbc;
} }
public static void forEach(Consumer<T05PartPental> consumer) { public static void forEach(Consumer<T05PartPental> consumer) {

View file

@ -6,11 +6,13 @@ import java.util.Map;
import java.util.function.Consumer; import java.util.function.Consumer;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import love.distributedrebirth.numberxd.base2t.facet.BasePart; import love.distributedrebirth.numberxd.base2t.bone.BasePartSplit6;
import love.distributedrebirth.numberxd.base2t.facet.BaseFacetKey; import love.distributedrebirth.numberxd.base2t.bone.BassBone;
import love.distributedrebirth.numberxd.base2t.facet.BaseFacetMap; import love.distributedrebirth.numberxd.base2t.bone.BassBoneAlt1;
import love.distributedrebirth.numberxd.base2t.facet.BasePartAlt1; import love.distributedrebirth.numberxd.base2t.bone.BassBoneAlt1Info;
import love.distributedrebirth.numberxd.base2t.facet.BasePartSplit6; 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. * The distribution by 6.
@ -19,7 +21,9 @@ import love.distributedrebirth.numberxd.base2t.facet.BasePartSplit6;
* *
* @author willemtsade ©Δ 仙上主天 * @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_1("˦","0","","4","A"),
PART_2("˨","1","","5","D"), PART_2("˨","1","","5","D"),
@ -30,27 +34,23 @@ public enum T06PartSeximal implements BasePart,BasePartAlt1,BasePartSplit6 {
; ;
public static int LENGTH() { return values().length; }; public static int LENGTH() { return values().length; };
private final BaseFacetMap bfm = BaseFacetMap.newInstance(); private final BassBoneCoffin bbc = BassBoneCoffin.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 static final Map<String, T06PartSeximal> TONE_MAP = Collections.unmodifiableMap( private static final Map<String, T06PartSeximal> TONE_MAP = Collections.unmodifiableMap(
Arrays.asList(values()).stream().collect(Collectors.toMap(v -> v.getIdentifierTone(), v -> v))); Arrays.asList(values()).stream().collect(Collectors.toMap(v -> v.getIdentifierTone(), v -> v)));
private static final Map<String, T06PartSeximal> CHINA_MAP = Collections.unmodifiableMap( private static final Map<String, T06PartSeximal> CHINA_MAP = Collections.unmodifiableMap(
Arrays.asList(values()).stream().collect(Collectors.toMap(v -> v.getChinaKey(), v -> v))); Arrays.asList(values()).stream().collect(Collectors.toMap(v -> v.getChinaKey(), v -> v)));
private T06PartSeximal(String idTone, String idLetter, String chinaKey, String chinaValue, String alt1Value) { private T06PartSeximal(String idTone, String idLetter, String chinaKey, String chinaValue, String alt1Value) {
this.getBFM().putInit(BaseFacetKey.ID_TONE, idTone); this.getBBC().putInit(BassBoneStoreKey.ID_TONE, idTone);
this.getBFM().putInit(BaseFacetKey.ID_LETTER, idLetter); this.getBBC().putInit(BassBoneStoreKey.ID_LETTER, idLetter);
this.getBFM().putInit(BaseFacetKey.CHINA_KEY, chinaKey); this.getBBC().putInit(BassBoneStoreKey.CHINA_KEY, chinaKey);
this.getBFM().putInit(BaseFacetKey.CHINA_VALUE, chinaValue); this.getBBC().putInit(BassBoneStoreKey.CHINA_VALUE, chinaValue);
this.getBFM().putInit(BaseFacetKey.ALT_1_VALUE, alt1Value); this.getBBC().putInit(BassBoneStoreKey.ALT_1_VALUE, alt1Value);
this.getBFM().putInit(BaseFacetKey.ALT_1_NAME, ALT_1_NAME);
this.getBFM().putInit(BaseFacetKey.ALT_1_WIKI, ALT_1_WIKI);
} }
@Override @Override
public BaseFacetMap getBFM() { public BassBoneCoffin getBBC() {
return bfm; return bbc;
} }
public static void forEach(Consumer<T06PartSeximal> consumer) { public static void forEach(Consumer<T06PartSeximal> consumer) {

View file

@ -6,17 +6,21 @@ import java.util.Map;
import java.util.function.Consumer; import java.util.function.Consumer;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import love.distributedrebirth.numberxd.base2t.facet.BasePart; import love.distributedrebirth.numberxd.base2t.bone.BassBone;
import love.distributedrebirth.numberxd.base2t.facet.BaseFacetKey; import love.distributedrebirth.numberxd.base2t.bone.BassBoneAlt1;
import love.distributedrebirth.numberxd.base2t.facet.BaseFacetMap; import love.distributedrebirth.numberxd.base2t.bone.BassBoneAlt1Info;
import love.distributedrebirth.numberxd.base2t.facet.BasePartAlt1; 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. * The distribution by 7.
* *
* @author willemtsade ©Δ 仙上主天 * @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_1("˥","0","♎︎","libra","天秤座"),
PART_2("","1","♏︎","scorpio","天蠍座"), PART_2("","1","♏︎","scorpio","天蠍座"),
@ -28,27 +32,23 @@ public enum T07PartPlanIt implements BasePart,BasePartAlt1 {
; ;
public static int LENGTH() { return values().length; }; public static int LENGTH() { return values().length; };
private final BaseFacetMap bfm = BaseFacetMap.newInstance(); private final BassBoneCoffin bbc = BassBoneCoffin.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 static final Map<String, T07PartPlanIt> TONE_MAP = Collections.unmodifiableMap( private static final Map<String, T07PartPlanIt> TONE_MAP = Collections.unmodifiableMap(
Arrays.asList(values()).stream().collect(Collectors.toMap(v -> v.getIdentifierTone(), v -> v))); Arrays.asList(values()).stream().collect(Collectors.toMap(v -> v.getIdentifierTone(), v -> v)));
private static final Map<String, T07PartPlanIt> CHINA_MAP = Collections.unmodifiableMap( private static final Map<String, T07PartPlanIt> CHINA_MAP = Collections.unmodifiableMap(
Arrays.asList(values()).stream().collect(Collectors.toMap(v -> v.getChinaKey(), v -> v))); Arrays.asList(values()).stream().collect(Collectors.toMap(v -> v.getChinaKey(), v -> v)));
private T07PartPlanIt(String idTone, String idLetter, String chinaKey, String chinaValue, String alt1Value) { private T07PartPlanIt(String idTone, String idLetter, String chinaKey, String chinaValue, String alt1Value) {
this.getBFM().putInit(BaseFacetKey.ID_TONE, idTone); this.getBBC().putInit(BassBoneStoreKey.ID_TONE, idTone);
this.getBFM().putInit(BaseFacetKey.ID_LETTER, idLetter); this.getBBC().putInit(BassBoneStoreKey.ID_LETTER, idLetter);
this.getBFM().putInit(BaseFacetKey.CHINA_KEY, chinaKey); this.getBBC().putInit(BassBoneStoreKey.CHINA_KEY, chinaKey);
this.getBFM().putInit(BaseFacetKey.CHINA_VALUE, chinaValue); this.getBBC().putInit(BassBoneStoreKey.CHINA_VALUE, chinaValue);
this.getBFM().putInit(BaseFacetKey.ALT_1_VALUE, alt1Value); this.getBBC().putInit(BassBoneStoreKey.ALT_1_VALUE, alt1Value);
this.getBFM().putInit(BaseFacetKey.ALT_1_NAME, ALT_1_NAME);
this.getBFM().putInit(BaseFacetKey.ALT_1_WIKI, ALT_1_WIKI);
} }
@Override @Override
public BaseFacetMap getBFM() { public BassBoneCoffin getBBC() {
return bfm; return bbc;
} }
public static void forEach(Consumer<T07PartPlanIt> consumer) { public static void forEach(Consumer<T07PartPlanIt> consumer) {

View file

@ -6,18 +6,24 @@ import java.util.Map;
import java.util.function.Consumer; import java.util.function.Consumer;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import love.distributedrebirth.numberxd.base2t.facet.BasePart; import love.distributedrebirth.numberxd.base2t.bone.BasePartSplit8;
import love.distributedrebirth.numberxd.base2t.facet.BaseFacetKey; import love.distributedrebirth.numberxd.base2t.bone.BassBone;
import love.distributedrebirth.numberxd.base2t.facet.BaseFacetMap; import love.distributedrebirth.numberxd.base2t.bone.BassBoneAlt1Info;
import love.distributedrebirth.numberxd.base2t.facet.BasePartAlt2; import love.distributedrebirth.numberxd.base2t.bone.BassBoneAlt2;
import love.distributedrebirth.numberxd.base2t.facet.BasePartSplit8; 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. * The distribution by 8.
* *
* @author willemtsade ©Δ 仙上主天 * @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_1("˥","0","","heart","˧˥˩","˥˩˧", 0),
PART_2("˩","1","","head", "˧˩˥","˩˥˧", 3), 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 LENGTH() { return values().length; };
public static int BIT_COUNT = 3; public static int BIT_COUNT = 3;
private static final byte BITMASK = 0x07; private static final byte BITMASK = 0x07;
private final BaseFacetMap bfm = BaseFacetMap.newInstance(); private final BassBoneCoffin bbc = BassBoneCoffin.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 static final Map<String, T08PartOctal> TONE_MAP = Collections.unmodifiableMap( private static final Map<String, T08PartOctal> TONE_MAP = Collections.unmodifiableMap(
Arrays.asList(values()).stream().collect(Collectors.toMap(v -> v.getIdentifierTone(), v -> v))); Arrays.asList(values()).stream().collect(Collectors.toMap(v -> v.getIdentifierTone(), v -> v)));
private static final Map<String, T08PartOctal> CHINA_MAP = Collections.unmodifiableMap( private static final Map<String, T08PartOctal> CHINA_MAP = Collections.unmodifiableMap(
Arrays.asList(values()).stream().collect(Collectors.toMap(v -> v.getChinaKey(), v -> v))); Arrays.asList(values()).stream().collect(Collectors.toMap(v -> v.getChinaKey(), v -> v)));
private T08PartOctal(String identifierTone, String identifierLetter, String chinaKey, String chinaValue, String alt1Value, String alt2Value, int shiftBits) { private T08PartOctal(String identifierTone, String identifierLetter, String chinaKey, String chinaValue, String alt1Value, String alt2Value, int shiftBits) {
this.getBFM().putInit(BaseFacetKey.ID_TONE, identifierTone); this.getBBC().putInit(BassBoneStoreKey.ID_TONE, identifierTone);
this.getBFM().putInit(BaseFacetKey.ID_LETTER, identifierLetter); this.getBBC().putInit(BassBoneStoreKey.ID_LETTER, identifierLetter);
this.getBFM().putInit(BaseFacetKey.CHINA_KEY, chinaKey); this.getBBC().putInit(BassBoneStoreKey.CHINA_KEY, chinaKey);
this.getBFM().putInit(BaseFacetKey.CHINA_VALUE, chinaValue); this.getBBC().putInit(BassBoneStoreKey.CHINA_VALUE, chinaValue);
this.getBFM().putInit(BaseFacetKey.SHIFT_BITS, Integer.valueOf(shiftBits)); this.getBBC().putInit(BassBoneStoreKey.SHIFT_BITS, Integer.valueOf(shiftBits));
this.getBFM().putInit(BaseFacetKey.ALT_1_VALUE, alt1Value); this.getBBC().putInit(BassBoneStoreKey.ALT_1_VALUE, alt1Value);
this.getBFM().putInit(BaseFacetKey.ALT_1_NAME, ALT_1_NAME); this.getBBC().putInit(BassBoneStoreKey.ALT_2_VALUE, alt2Value);
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);
} }
@Override @Override
public BaseFacetMap getBFM() { public BassBoneCoffin getBBC() {
return bfm; return bbc;
} }
public static T08PartOctal indexOf(T08PartOctal group, int value) { public static T08PartOctal indexOf(T08PartOctal group, int value) {

View file

@ -6,17 +6,27 @@ import java.util.Map;
import java.util.function.Consumer; import java.util.function.Consumer;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import love.distributedrebirth.numberxd.base2t.facet.BasePart; import love.distributedrebirth.numberxd.base2t.bone.BassBone;
import love.distributedrebirth.numberxd.base2t.facet.BasePartAlt4; import love.distributedrebirth.numberxd.base2t.bone.BassBoneAlt1Info;
import love.distributedrebirth.numberxd.base2t.facet.BaseFacetKey; import love.distributedrebirth.numberxd.base2t.bone.BassBoneAlt2Info;
import love.distributedrebirth.numberxd.base2t.facet.BaseFacetMap; 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. * The distribution by 10.
* *
* @author willemtsade ©Δ 仙上主天 * @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_1 ("˥","ō","","zero", "","\u1040","", ""),
PART_2 ("˦","α","","one", "","\u1041","", ""), PART_2 ("˦","α","","one", "","\u1041","", ""),
@ -31,15 +41,7 @@ public enum T10PartDecimal implements BasePart,BasePartAlt4 {
; ;
public static int LENGTH() { return values().length; }; public static int LENGTH() { return values().length; };
private final BaseFacetMap bfm = BaseFacetMap.newInstance(); private final BassBoneCoffin bbc = BassBoneCoffin.newInstance();
private static final String ALT_1_NAME = "Korean numerals";
private static final String ALT_1_WIKI = "https://en.wikipedia.org/wiki/Korean_numerals";
private static final String ALT_2_NAME = "Burmese numerals"; // Escaped to keep stable line height
private static final String ALT_2_WIKI = "https://en.wikipedia.org/wiki/Burmese_numerals";
private static final String ALT_3_NAME = "Bengali numerals";
private static final String ALT_3_WIKI = "https://en.wikipedia.org/wiki/Bengali_numerals";
private static final String ALT_4_NAME = "Sinhala Lith Illakkam";
private static final String ALT_4_WIKI = "https://en.wikipedia.org/wiki/Sinhala_numerals#Numerals";
private static final Map<String, T10PartDecimal> TONE_MAP = Collections.unmodifiableMap( private static final Map<String, T10PartDecimal> TONE_MAP = Collections.unmodifiableMap(
Arrays.asList(values()).stream().collect(Collectors.toMap(v -> v.getIdentifierTone(), v -> v))); Arrays.asList(values()).stream().collect(Collectors.toMap(v -> v.getIdentifierTone(), v -> v)));
private static final Map<String, T10PartDecimal> CHINA_MAP = Collections.unmodifiableMap( private static final Map<String, T10PartDecimal> CHINA_MAP = Collections.unmodifiableMap(
@ -47,27 +49,19 @@ public enum T10PartDecimal implements BasePart,BasePartAlt4 {
private T10PartDecimal(String idTone, String idLetter, String chinaKey, String chinaValue, private T10PartDecimal(String idTone, String idLetter, String chinaKey, String chinaValue,
String alt1Value, String alt2Value, String alt3Value, String alt4Value) { String alt1Value, String alt2Value, String alt3Value, String alt4Value) {
this.getBFM().putInit(BaseFacetKey.ID_TONE, idTone); this.getBBC().putInit(BassBoneStoreKey.ID_TONE, idTone);
this.getBFM().putInit(BaseFacetKey.ID_LETTER, idLetter); this.getBBC().putInit(BassBoneStoreKey.ID_LETTER, idLetter);
this.getBFM().putInit(BaseFacetKey.CHINA_KEY, chinaKey); this.getBBC().putInit(BassBoneStoreKey.CHINA_KEY, chinaKey);
this.getBFM().putInit(BaseFacetKey.CHINA_VALUE, chinaValue); this.getBBC().putInit(BassBoneStoreKey.CHINA_VALUE, chinaValue);
this.getBFM().putInit(BaseFacetKey.ALT_1_VALUE, alt1Value); this.getBBC().putInit(BassBoneStoreKey.ALT_1_VALUE, alt1Value);
this.getBFM().putInit(BaseFacetKey.ALT_1_NAME, ALT_1_NAME); this.getBBC().putInit(BassBoneStoreKey.ALT_2_VALUE, alt2Value);
this.getBFM().putInit(BaseFacetKey.ALT_1_WIKI, ALT_1_WIKI); this.getBBC().putInit(BassBoneStoreKey.ALT_3_VALUE, alt3Value);
this.getBFM().putInit(BaseFacetKey.ALT_2_VALUE, alt2Value); this.getBBC().putInit(BassBoneStoreKey.ALT_4_VALUE, alt4Value);
this.getBFM().putInit(BaseFacetKey.ALT_2_NAME, ALT_2_NAME);
this.getBFM().putInit(BaseFacetKey.ALT_2_WIKI, ALT_2_WIKI);
this.getBFM().putInit(BaseFacetKey.ALT_3_VALUE, alt3Value);
this.getBFM().putInit(BaseFacetKey.ALT_3_NAME, ALT_3_NAME);
this.getBFM().putInit(BaseFacetKey.ALT_3_WIKI, ALT_3_WIKI);
this.getBFM().putInit(BaseFacetKey.ALT_4_VALUE, alt4Value);
this.getBFM().putInit(BaseFacetKey.ALT_4_NAME, ALT_4_NAME);
this.getBFM().putInit(BaseFacetKey.ALT_4_WIKI, ALT_4_WIKI);
} }
@Override @Override
public BaseFacetMap getBFM() { public BassBoneCoffin getBBC() {
return bfm; return bbc;
} }
public static void forEach(Consumer<T10PartDecimal> consumer) { public static void forEach(Consumer<T10PartDecimal> consumer) {

View file

@ -6,17 +6,21 @@ import java.util.Map;
import java.util.function.Consumer; import java.util.function.Consumer;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import love.distributedrebirth.numberxd.base2t.facet.BasePart; import love.distributedrebirth.numberxd.base2t.bone.BassBone;
import love.distributedrebirth.numberxd.base2t.facet.BasePartAlt1; import love.distributedrebirth.numberxd.base2t.bone.BassBoneAlt1;
import love.distributedrebirth.numberxd.base2t.facet.BaseFacetKey; import love.distributedrebirth.numberxd.base2t.bone.BassBoneAlt1Info;
import love.distributedrebirth.numberxd.base2t.facet.BaseFacetMap; 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. * The distribution by 11.
* *
* @author willemtsade ©Δ 仙上主天 * @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_1 ("˥","0","","walk", ""),
PART_2 ("","1","","run", ""), PART_2 ("","1","","run", ""),
@ -32,27 +36,23 @@ public enum T11PartUndecimal implements BasePart,BasePartAlt1 {
; ;
public static int LENGTH() { return values().length; }; public static int LENGTH() { return values().length; };
private final BaseFacetMap bfm = BaseFacetMap.newInstance(); private final BassBoneCoffin bbc = BassBoneCoffin.newInstance();
private static final String ALT_1_NAME = "Tamil numerals";
private static final String ALT_1_WIKI = "https://en.wikipedia.org/wiki/Tamil_numerals";
private static final Map<String, T11PartUndecimal> TONE_MAP = Collections.unmodifiableMap( private static final Map<String, T11PartUndecimal> TONE_MAP = Collections.unmodifiableMap(
Arrays.asList(values()).stream().collect(Collectors.toMap(v -> v.getIdentifierTone(), v -> v))); Arrays.asList(values()).stream().collect(Collectors.toMap(v -> v.getIdentifierTone(), v -> v)));
private static final Map<String, T11PartUndecimal> CHINA_MAP = Collections.unmodifiableMap( private static final Map<String, T11PartUndecimal> CHINA_MAP = Collections.unmodifiableMap(
Arrays.asList(values()).stream().collect(Collectors.toMap(v -> v.getChinaKey(), v -> v))); Arrays.asList(values()).stream().collect(Collectors.toMap(v -> v.getChinaKey(), v -> v)));
private T11PartUndecimal(String idTone, String idLetter, String chinaKey, String chinaValue, String alt1Value) { private T11PartUndecimal(String idTone, String idLetter, String chinaKey, String chinaValue, String alt1Value) {
this.getBFM().putInit(BaseFacetKey.ID_TONE, idTone); this.getBBC().putInit(BassBoneStoreKey.ID_TONE, idTone);
this.getBFM().putInit(BaseFacetKey.ID_LETTER, idLetter); this.getBBC().putInit(BassBoneStoreKey.ID_LETTER, idLetter);
this.getBFM().putInit(BaseFacetKey.CHINA_KEY, chinaKey); this.getBBC().putInit(BassBoneStoreKey.CHINA_KEY, chinaKey);
this.getBFM().putInit(BaseFacetKey.CHINA_VALUE, chinaValue); this.getBBC().putInit(BassBoneStoreKey.CHINA_VALUE, chinaValue);
this.getBFM().putInit(BaseFacetKey.ALT_1_VALUE, alt1Value); this.getBBC().putInit(BassBoneStoreKey.ALT_1_VALUE, alt1Value);
this.getBFM().putInit(BaseFacetKey.ALT_1_NAME, ALT_1_NAME);
this.getBFM().putInit(BaseFacetKey.ALT_1_WIKI, ALT_1_WIKI);
} }
@Override @Override
public BaseFacetMap getBFM() { public BassBoneCoffin getBBC() {
return bfm; return bbc;
} }
public static void forEach(Consumer<T11PartUndecimal> consumer) { public static void forEach(Consumer<T11PartUndecimal> consumer) {

View file

@ -6,17 +6,21 @@ import java.util.Map;
import java.util.function.Consumer; import java.util.function.Consumer;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import love.distributedrebirth.numberxd.base2t.facet.BasePart; import love.distributedrebirth.numberxd.base2t.bone.BassBone;
import love.distributedrebirth.numberxd.base2t.facet.BaseFacetKey; import love.distributedrebirth.numberxd.base2t.bone.BassBoneAlt1;
import love.distributedrebirth.numberxd.base2t.facet.BaseFacetMap; import love.distributedrebirth.numberxd.base2t.bone.BassBoneAlt1Info;
import love.distributedrebirth.numberxd.base2t.facet.BasePartAlt1; 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. * The distribution by 12.
* *
* @author willemtsade ©Δ 仙上主天 * @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_1 ("˥","0","","sun", "0"),
PART_2 ("˧","1","","moon", "1"), PART_2 ("˧","1","","moon", "1"),
@ -33,27 +37,23 @@ public enum T12PartUncial implements BasePart,BasePartAlt1 {
; ;
public static int LENGTH() { return values().length; }; public static int LENGTH() { return values().length; };
private final BaseFacetMap bfm = BaseFacetMap.newInstance(); private final BassBoneCoffin bbc = BassBoneCoffin.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 static final Map<String, T12PartUncial> TONE_MAP = Collections.unmodifiableMap( private static final Map<String, T12PartUncial> TONE_MAP = Collections.unmodifiableMap(
Arrays.asList(values()).stream().collect(Collectors.toMap(v -> v.getIdentifierTone(), v -> v))); Arrays.asList(values()).stream().collect(Collectors.toMap(v -> v.getIdentifierTone(), v -> v)));
private static final Map<String, T12PartUncial> CHINA_MAP = Collections.unmodifiableMap( private static final Map<String, T12PartUncial> CHINA_MAP = Collections.unmodifiableMap(
Arrays.asList(values()).stream().collect(Collectors.toMap(v -> v.getChinaKey(), v -> v))); Arrays.asList(values()).stream().collect(Collectors.toMap(v -> v.getChinaKey(), v -> v)));
private T12PartUncial(String idTone, String idLetter, String chinaKey, String chinaValue, String alt1Value) { private T12PartUncial(String idTone, String idLetter, String chinaKey, String chinaValue, String alt1Value) {
this.getBFM().putInit(BaseFacetKey.ID_TONE, idTone); this.getBBC().putInit(BassBoneStoreKey.ID_TONE, idTone);
this.getBFM().putInit(BaseFacetKey.ID_LETTER, idLetter); this.getBBC().putInit(BassBoneStoreKey.ID_LETTER, idLetter);
this.getBFM().putInit(BaseFacetKey.CHINA_KEY, chinaKey); this.getBBC().putInit(BassBoneStoreKey.CHINA_KEY, chinaKey);
this.getBFM().putInit(BaseFacetKey.CHINA_VALUE, chinaValue); this.getBBC().putInit(BassBoneStoreKey.CHINA_VALUE, chinaValue);
this.getBFM().putInit(BaseFacetKey.ALT_1_VALUE, alt1Value); this.getBBC().putInit(BassBoneStoreKey.ALT_1_VALUE, alt1Value);
this.getBFM().putInit(BaseFacetKey.ALT_1_NAME, ALT_1_NAME);
this.getBFM().putInit(BaseFacetKey.ALT_1_WIKI, ALT_1_WIKI);
} }
@Override @Override
public BaseFacetMap getBFM() { public BassBoneCoffin getBBC() {
return bfm; return bbc;
} }
public static void forEach(Consumer<T12PartUncial> consumer) { public static void forEach(Consumer<T12PartUncial> consumer) {

View file

@ -6,18 +6,22 @@ import java.util.Map;
import java.util.function.Consumer; import java.util.function.Consumer;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import love.distributedrebirth.numberxd.base2t.facet.BasePart; import love.distributedrebirth.numberxd.base2t.bone.BasePartSplit16;
import love.distributedrebirth.numberxd.base2t.facet.BaseFacetKey; import love.distributedrebirth.numberxd.base2t.bone.BassBone;
import love.distributedrebirth.numberxd.base2t.facet.BaseFacetMap; import love.distributedrebirth.numberxd.base2t.bone.BassBoneAlt1;
import love.distributedrebirth.numberxd.base2t.facet.BasePartAlt1; import love.distributedrebirth.numberxd.base2t.bone.BassBoneAlt1Info;
import love.distributedrebirth.numberxd.base2t.facet.BasePartSplit16; 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. * The distribution by 16.
* *
* @author willemtsade ©Δ 仙上主天 * @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_1 ("˥","0","","hydrogen", "1"),
PART_2 ("˦","1","","helium", "2"), PART_2 ("˦","1","","helium", "2"),
@ -38,27 +42,23 @@ public enum T16PartHex implements BasePart,BasePartAlt1,BasePartSplit16 {
; ;
public static int LENGTH() { return values().length; }; public static int LENGTH() { return values().length; };
private final BaseFacetMap bfm = BaseFacetMap.newInstance(); private final BassBoneCoffin bbc = BassBoneCoffin.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 static final Map<String, T16PartHex> TONE_MAP = Collections.unmodifiableMap( private static final Map<String, T16PartHex> TONE_MAP = Collections.unmodifiableMap(
Arrays.asList(values()).stream().collect(Collectors.toMap(v -> v.getIdentifierTone(), v -> v))); Arrays.asList(values()).stream().collect(Collectors.toMap(v -> v.getIdentifierTone(), v -> v)));
private static final Map<String, T16PartHex> CHINA_MAP = Collections.unmodifiableMap( private static final Map<String, T16PartHex> CHINA_MAP = Collections.unmodifiableMap(
Arrays.asList(values()).stream().collect(Collectors.toMap(v -> v.getChinaKey(), v -> v))); Arrays.asList(values()).stream().collect(Collectors.toMap(v -> v.getChinaKey(), v -> v)));
private T16PartHex(String idTone, String idLetter, String chinaKey, String chinaValue, String alt1Value) { private T16PartHex(String idTone, String idLetter, String chinaKey, String chinaValue, String alt1Value) {
this.getBFM().putInit(BaseFacetKey.ID_TONE, idTone); this.getBBC().putInit(BassBoneStoreKey.ID_TONE, idTone);
this.getBFM().putInit(BaseFacetKey.ID_LETTER, idLetter); this.getBBC().putInit(BassBoneStoreKey.ID_LETTER, idLetter);
this.getBFM().putInit(BaseFacetKey.CHINA_KEY, chinaKey); this.getBBC().putInit(BassBoneStoreKey.CHINA_KEY, chinaKey);
this.getBFM().putInit(BaseFacetKey.CHINA_VALUE, chinaValue); this.getBBC().putInit(BassBoneStoreKey.CHINA_VALUE, chinaValue);
this.getBFM().putInit(BaseFacetKey.ALT_1_VALUE, alt1Value); this.getBBC().putInit(BassBoneStoreKey.ALT_1_VALUE, alt1Value);
this.getBFM().putInit(BaseFacetKey.ALT_1_NAME, ALT_1_NAME);
this.getBFM().putInit(BaseFacetKey.ALT_1_WIKI, ALT_1_WIKI);
} }
@Override @Override
public BaseFacetMap getBFM() { public BassBoneCoffin getBBC() {
return bfm; return bbc;
} }
public static void forEach(Consumer<T16PartHex> consumer) { public static void forEach(Consumer<T16PartHex> consumer) {

View file

@ -6,17 +6,25 @@ import java.util.Map;
import java.util.function.Consumer; import java.util.function.Consumer;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import love.distributedrebirth.numberxd.base2t.facet.BasePart; import love.distributedrebirth.numberxd.base2t.bone.BassBone;
import love.distributedrebirth.numberxd.base2t.facet.BaseFacetKey; import love.distributedrebirth.numberxd.base2t.bone.BassBoneAlt1Info;
import love.distributedrebirth.numberxd.base2t.facet.BaseFacetMap; import love.distributedrebirth.numberxd.base2t.bone.BassBoneAlt2Info;
import love.distributedrebirth.numberxd.base2t.facet.BasePartAlt3; 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. * The distribution by 20.
* *
* @author willemtsade ©Δ 仙上主天 * @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_1 ("˥","Y", "","yotta","0","0","2"),
PART_2 ("˦","Z", "","zetta","1","1","3"), PART_2 ("˦","Z", "","zetta","1","1","3"),
@ -41,13 +49,7 @@ public enum T20PartScore implements BasePart,BasePartAlt3 {
; ;
public static int LENGTH() { return values().length; }; public static int LENGTH() { return values().length; };
private final BaseFacetMap bfm = BaseFacetMap.newInstance(); private final BassBoneCoffin bbc = BassBoneCoffin.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 static final Map<String, T20PartScore> TONE_MAP = Collections.unmodifiableMap( private static final Map<String, T20PartScore> TONE_MAP = Collections.unmodifiableMap(
Arrays.asList(values()).stream().collect(Collectors.toMap(v -> v.getIdentifierTone(), v -> v))); Arrays.asList(values()).stream().collect(Collectors.toMap(v -> v.getIdentifierTone(), v -> v)));
private static final Map<String, T20PartScore> CHINA_MAP = Collections.unmodifiableMap( private static final Map<String, T20PartScore> CHINA_MAP = Collections.unmodifiableMap(
@ -57,24 +59,18 @@ public enum T20PartScore implements BasePart,BasePartAlt3 {
private T20PartScore(String idTone, String idLetter, String chinaKey, String chinaValue, private T20PartScore(String idTone, String idLetter, String chinaKey, String chinaValue,
String alt1Value, String alt2Value, String alt3Value) { String alt1Value, String alt2Value, String alt3Value) {
this.getBFM().putInit(BaseFacetKey.ID_TONE, idTone); this.getBBC().putInit(BassBoneStoreKey.ID_TONE, idTone);
this.getBFM().putInit(BaseFacetKey.ID_LETTER, idLetter); this.getBBC().putInit(BassBoneStoreKey.ID_LETTER, idLetter);
this.getBFM().putInit(BaseFacetKey.CHINA_KEY, chinaKey); this.getBBC().putInit(BassBoneStoreKey.CHINA_KEY, chinaKey);
this.getBFM().putInit(BaseFacetKey.CHINA_VALUE, chinaValue); this.getBBC().putInit(BassBoneStoreKey.CHINA_VALUE, chinaValue);
this.getBFM().putInit(BaseFacetKey.ALT_1_VALUE, alt1Value); this.getBBC().putInit(BassBoneStoreKey.ALT_1_VALUE, alt1Value);
this.getBFM().putInit(BaseFacetKey.ALT_1_NAME, ALT_1_NAME); this.getBBC().putInit(BassBoneStoreKey.ALT_2_VALUE, alt2Value);
this.getBFM().putInit(BaseFacetKey.ALT_1_WIKI, ALT_1_WIKI); this.getBBC().putInit(BassBoneStoreKey.ALT_3_VALUE, alt3Value);
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);
} }
@Override @Override
public BaseFacetMap getBFM() { public BassBoneCoffin getBBC() {
return bfm; return bbc;
} }
public static void forEach(Consumer<T20PartScore> consumer) { public static void forEach(Consumer<T20PartScore> consumer) {

View file

@ -6,16 +6,18 @@ import java.util.Map;
import java.util.function.Consumer; import java.util.function.Consumer;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import love.distributedrebirth.numberxd.base2t.facet.BasePart; import love.distributedrebirth.numberxd.base2t.bone.BassBone;
import love.distributedrebirth.numberxd.base2t.facet.BaseFacetKey; import love.distributedrebirth.numberxd.base2t.bone.BassBoneCoffin;
import love.distributedrebirth.numberxd.base2t.facet.BaseFacetMap; import love.distributedrebirth.numberxd.base2t.bone.BassBoneName;
import love.distributedrebirth.numberxd.base2t.bone.BassBoneStoreKey;
/** /**
* The distribution by 60. * The distribution by 60.
* *
* @author willemtsade ©Δ 仙上主天 * @author willemtsade ©Δ 仙上主天
*/ */
public enum T60Sexagesimal implements BasePart { @BassBoneName("T60Sexagesimal")
public enum T60Sexagesimal implements BassBone {
PART_1 ("˧˩˥","ια","","cow"), PART_1 ("˧˩˥","ια","","cow"),
PART_2 ("˧˥˦","ιβ","","chicken"), PART_2 ("˧˥˦","ιβ","","chicken"),
@ -83,21 +85,21 @@ public enum T60Sexagesimal implements BasePart {
; ;
public static int LENGTH() { return values().length; }; public static int LENGTH() { return values().length; };
private final BaseFacetMap bfm = BaseFacetMap.newInstance(); private final BassBoneCoffin bfm = BassBoneCoffin.newInstance();
private static final Map<String, T60Sexagesimal> TONE_MAP = Collections.unmodifiableMap( private static final Map<String, T60Sexagesimal> TONE_MAP = Collections.unmodifiableMap(
Arrays.asList(values()).stream().collect(Collectors.toMap(v -> v.getIdentifierTone(), v -> v))); Arrays.asList(values()).stream().collect(Collectors.toMap(v -> v.getIdentifierTone(), v -> v)));
private static final Map<String, T60Sexagesimal> CHINA_MAP = Collections.unmodifiableMap( private static final Map<String, T60Sexagesimal> CHINA_MAP = Collections.unmodifiableMap(
Arrays.asList(values()).stream().collect(Collectors.toMap(v -> v.getChinaKey(), v -> v))); Arrays.asList(values()).stream().collect(Collectors.toMap(v -> v.getChinaKey(), v -> v)));
private T60Sexagesimal(String idTone, String idLetter, String chinaKey, String chinaValue) { private T60Sexagesimal(String idTone, String idLetter, String chinaKey, String chinaValue) {
this.getBFM().putInit(BaseFacetKey.ID_TONE, idTone); this.getBBC().putInit(BassBoneStoreKey.ID_TONE, idTone);
this.getBFM().putInit(BaseFacetKey.ID_LETTER, idLetter); this.getBBC().putInit(BassBoneStoreKey.ID_LETTER, idLetter);
this.getBFM().putInit(BaseFacetKey.CHINA_KEY, chinaKey); this.getBBC().putInit(BassBoneStoreKey.CHINA_KEY, chinaKey);
this.getBFM().putInit(BaseFacetKey.CHINA_VALUE, chinaValue); this.getBBC().putInit(BassBoneStoreKey.CHINA_VALUE, chinaValue);
} }
@Override @Override
public BaseFacetMap getBFM() { public BassBoneCoffin getBBC() {
return bfm; return bfm;
} }

View file

@ -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);
}
}

View file

@ -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.T02PartBinary;
import love.distributedrebirth.numberxd.base2t.T04PartQuad; import love.distributedrebirth.numberxd.base2t.T04PartQuad;
@ -8,7 +8,7 @@ import love.distributedrebirth.numberxd.base2t.T04PartQuad;
* *
* @author willemtsade ©Δ 仙上主天 * @author willemtsade ©Δ 仙上主天
*/ */
public interface BasePartSplit16 extends BasePart { public interface BasePartSplit16 extends BassBone {
default T02PartBinary splitPartBinary(T04PartQuad part) { default T02PartBinary splitPartBinary(T04PartQuad part) {
return T02PartBinary.values()[(ordinal() >> part.ordinal()) & 1]; return T02PartBinary.values()[(ordinal() >> part.ordinal()) & 1];

View file

@ -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.T02PartBinary;
@ -7,7 +7,7 @@ import love.distributedrebirth.numberxd.base2t.T02PartBinary;
* *
* @author willemtsade ©Δ 仙上主天 * @author willemtsade ©Δ 仙上主天
*/ */
public interface BasePartSplit4 extends BasePart { public interface BasePartSplit4 extends BassBone {
default T02PartBinary splitPartBinary(T02PartBinary part) { default T02PartBinary splitPartBinary(T02PartBinary part) {
return T02PartBinary.values()[(ordinal() >> part.ordinal()) & 1]; return T02PartBinary.values()[(ordinal() >> part.ordinal()) & 1];

View file

@ -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.T02PartBinary;
import love.distributedrebirth.numberxd.base2t.T03PartTrit; import love.distributedrebirth.numberxd.base2t.T03PartTrit;
@ -8,7 +8,7 @@ import love.distributedrebirth.numberxd.base2t.T03PartTrit;
* *
* @author willemtsade ©Δ 仙上主天 * @author willemtsade ©Δ 仙上主天
*/ */
public interface BasePartSplit6 extends BasePart { public interface BasePartSplit6 extends BassBone {
default T02PartBinary splitPartBinary() { default T02PartBinary splitPartBinary() {
return T02PartBinary.values()[ordinal() & 1]; return T02PartBinary.values()[ordinal() & 1];

View file

@ -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.T02PartBinary;
import love.distributedrebirth.numberxd.base2t.T03PartTrit; import love.distributedrebirth.numberxd.base2t.T03PartTrit;

View file

@ -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);
}
}

View file

@ -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();
}
}

View file

@ -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();
}

View file

@ -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();
}
}

View file

@ -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();
}

View file

@ -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();
}
}

View file

@ -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();
}

View file

@ -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();
}
}

View file

@ -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();
}

View file

@ -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<BassBoneStoreKey,Object> 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);
}
};
}
}

View file

@ -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();
}

View file

@ -0,0 +1,11 @@
package love.distributedrebirth.numberxd.base2t.bone;
/**
*
*
* @author willemtsade ©Δ 仙上主天
*/
public interface BassBoneStore {
BassBoneCoffin getBBC();
}

View file

@ -1,11 +1,11 @@
package love.distributedrebirth.numberxd.base2t.facet; package love.distributedrebirth.numberxd.base2t.bone;
/** /**
* *
* *
* @author willemtsade ©Δ 仙上主天 * @author willemtsade ©Δ 仙上主天
*/ */
public enum BaseFacetKey { public enum BassBoneStoreKey {
ID_TONE, ID_TONE,
ID_LETTER, ID_LETTER,
@ -14,16 +14,8 @@ public enum BaseFacetKey {
SHIFT_BITS, SHIFT_BITS,
ALT_1_VALUE, ALT_1_VALUE,
ALT_1_NAME,
ALT_1_WIKI,
ALT_2_VALUE, ALT_2_VALUE,
ALT_2_NAME,
ALT_2_WIKI,
ALT_3_VALUE, ALT_3_VALUE,
ALT_3_NAME,
ALT_3_WIKI,
ALT_4_VALUE, ALT_4_VALUE,
ALT_4_NAME,
ALT_4_WIKI,
; ;
} }

View file

@ -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<BaseFacetKey,Object> 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);
}
};
}
}

View file

@ -1,11 +0,0 @@
package love.distributedrebirth.numberxd.base2t.facet;
/**
*
*
* @author willemtsade ©Δ 仙上主天
*/
public interface BaseFacetStore {
BaseFacetMap getBFM();
}

View file

@ -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);
}
}

View file

@ -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);
}
}

View file

@ -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);
}
}

View file

@ -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);
}
}

View file

@ -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);
}
}

View file

@ -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);
}
}

View file

@ -6,7 +6,7 @@ import java.util.Map;
import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test; 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() { public void testGlobalChinaKeyMap() {
Map<String,String> global = new HashMap<>(); Map<String,String> global = new HashMap<>();
for (int base:BasePartFactory.getSupportedBases()) { for (int base:BasePartFactory.getSupportedBases()) {
for (BasePart part:BasePartFactory.buildBasePartsByBase(base)) { for (BassBone part:BasePartFactory.buildBassBonesByBase(base)) {
Assertions.assertFalse(global.containsKey(part.getChinaKey())); Assertions.assertFalse(global.containsKey(part.getChinaKey()));
global.put(part.getChinaKey(), part.getChinaValue()); global.put(part.getChinaKey(), part.getChinaValue());
} }
@ -39,7 +39,7 @@ public class BasePartFactoryTest {
public void testGlobalChinaValueMap() { public void testGlobalChinaValueMap() {
Map<String,String> global = new HashMap<>(); Map<String,String> global = new HashMap<>();
for (int base:BasePartFactory.getSupportedBases()) { for (int base:BasePartFactory.getSupportedBases()) {
for (BasePart part:BasePartFactory.buildBasePartsByBase(base)) { for (BassBone part:BasePartFactory.buildBassBonesByBase(base)) {
Assertions.assertFalse(global.containsKey(part.getChinaValue())); Assertions.assertFalse(global.containsKey(part.getChinaValue()));
global.put(part.getChinaValue(), part.getChinaValue()); global.put(part.getChinaValue(), part.getChinaValue());
} }
@ -52,7 +52,7 @@ public class BasePartFactoryTest {
boolean duplicate = false; boolean duplicate = false;
Map<String,String> global = new HashMap<>(); Map<String,String> global = new HashMap<>();
for (int base:BasePartFactory.getSupportedBases()) { for (int base:BasePartFactory.getSupportedBases()) {
for (BasePart part:BasePartFactory.buildBasePartsByBase(base)) { for (BassBone part:BasePartFactory.buildBassBonesByBase(base)) {
if (global.containsKey(part.getIdentifierTone())) { if (global.containsKey(part.getIdentifierTone())) {
duplicate = true; duplicate = true;
break; break;
@ -69,7 +69,7 @@ public class BasePartFactoryTest {
boolean duplicate = false; boolean duplicate = false;
Map<String,String> global = new HashMap<>(); Map<String,String> global = new HashMap<>();
for (int base:BasePartFactory.getSupportedBases()) { for (int base:BasePartFactory.getSupportedBases()) {
for (BasePart part:BasePartFactory.buildBasePartsByBase(base)) { for (BassBone part:BasePartFactory.buildBassBonesByBase(base)) {
if (global.containsKey(part.getIdentifierLetter())) { if (global.containsKey(part.getIdentifierLetter())) {
duplicate = true; duplicate = true;
break; break;

View file

@ -18,8 +18,8 @@ public class T04PartQuadTest {
Assertions.assertNotNull(value.getChinaKey()); Assertions.assertNotNull(value.getChinaKey());
Assertions.assertNotNull(value.getChinaValue()); Assertions.assertNotNull(value.getChinaValue());
Assertions.assertNotNull(value.getAlt1Value()); Assertions.assertNotNull(value.getAlt1Value());
Assertions.assertNotNull(value.getAlt1Name()); Assertions.assertNotNull(value.staticAlt1Name());
Assertions.assertNotNull(value.getAlt1Wiki()); Assertions.assertNotNull(value.staticAlt1Website());
} }
} }

View file

@ -18,8 +18,8 @@ public class T06PartSeximalTest {
Assertions.assertNotNull(value.getChinaKey()); Assertions.assertNotNull(value.getChinaKey());
Assertions.assertNotNull(value.getChinaValue()); Assertions.assertNotNull(value.getChinaValue());
Assertions.assertNotNull(value.getAlt1Value()); Assertions.assertNotNull(value.getAlt1Value());
Assertions.assertNotNull(value.getAlt1Name()); Assertions.assertNotNull(value.staticAlt1Name());
Assertions.assertNotNull(value.getAlt1Wiki()); Assertions.assertNotNull(value.staticAlt1Website());
} }
} }

View file

@ -18,8 +18,8 @@ public class T07PartPlanItTest {
Assertions.assertNotNull(value.getChinaKey()); Assertions.assertNotNull(value.getChinaKey());
Assertions.assertNotNull(value.getChinaValue()); Assertions.assertNotNull(value.getChinaValue());
Assertions.assertNotNull(value.getAlt1Value()); Assertions.assertNotNull(value.getAlt1Value());
Assertions.assertNotNull(value.getAlt1Name()); Assertions.assertNotNull(value.staticAlt1Name());
Assertions.assertNotNull(value.getAlt1Wiki()); Assertions.assertNotNull(value.staticAlt1Website());
} }
} }

View file

@ -18,11 +18,11 @@ public class T08PartOctalTest {
Assertions.assertNotNull(value.getChinaKey()); Assertions.assertNotNull(value.getChinaKey());
Assertions.assertNotNull(value.getChinaValue()); Assertions.assertNotNull(value.getChinaValue());
Assertions.assertNotNull(value.getAlt1Value()); Assertions.assertNotNull(value.getAlt1Value());
Assertions.assertNotNull(value.getAlt1Name()); Assertions.assertNotNull(value.staticAlt1Name());
Assertions.assertNotNull(value.getAlt1Wiki()); Assertions.assertNotNull(value.staticAlt1Website());
Assertions.assertNotNull(value.getAlt2Value()); Assertions.assertNotNull(value.getAlt2Value());
Assertions.assertNotNull(value.getAlt2Name()); Assertions.assertNotNull(value.staticAlt2Name());
Assertions.assertNotNull(value.getAlt2Wiki()); Assertions.assertNotNull(value.staticAlt2Website());
} }
} }

View file

@ -18,8 +18,8 @@ public class T12PartUncialTest {
Assertions.assertNotNull(value.getChinaKey()); Assertions.assertNotNull(value.getChinaKey());
Assertions.assertNotNull(value.getChinaValue()); Assertions.assertNotNull(value.getChinaValue());
Assertions.assertNotNull(value.getAlt1Value()); Assertions.assertNotNull(value.getAlt1Value());
Assertions.assertNotNull(value.getAlt1Name()); Assertions.assertNotNull(value.staticAlt1Name());
Assertions.assertNotNull(value.getAlt1Wiki()); Assertions.assertNotNull(value.staticAlt1Website());
} }
} }

View file

@ -18,8 +18,8 @@ public class T16PartHexTest {
Assertions.assertNotNull(value.getChinaKey()); Assertions.assertNotNull(value.getChinaKey());
Assertions.assertNotNull(value.getChinaValue()); Assertions.assertNotNull(value.getChinaValue());
Assertions.assertNotNull(value.getAlt1Value()); Assertions.assertNotNull(value.getAlt1Value());
Assertions.assertNotNull(value.getAlt1Name()); Assertions.assertNotNull(value.staticAlt1Name());
Assertions.assertNotNull(value.getAlt1Wiki()); Assertions.assertNotNull(value.staticAlt1Website());
} }
} }

View file

@ -18,8 +18,8 @@ public class T20PartScoreTest {
Assertions.assertNotNull(value.getChinaKey()); Assertions.assertNotNull(value.getChinaKey());
Assertions.assertNotNull(value.getChinaValue()); Assertions.assertNotNull(value.getChinaValue());
Assertions.assertNotNull(value.getAlt1Value()); Assertions.assertNotNull(value.getAlt1Value());
Assertions.assertNotNull(value.getAlt1Name()); Assertions.assertNotNull(value.staticAlt1Name());
Assertions.assertNotNull(value.getAlt1Wiki()); Assertions.assertNotNull(value.staticAlt1Website());
} }
} }