Split enum into set and uppercased bbc paths.
This commit is contained in:
parent
201f8f7ae3
commit
caf31e2f96
|
@ -21,16 +21,16 @@ public enum T02PartBinary implements BassBone<T02PartBinary> {
|
|||
private final BassBoneCoffin bbc = BassBoneCoffin.newInstance();
|
||||
|
||||
private T02PartBinary(String idTone, String idLetter, String chinaKey, String chinaValue) {
|
||||
getBBC().putInit(BassBoneStoreKey.ID_TONE, idTone);
|
||||
getBBC().putInit(BassBoneStoreKey.ID_LETTER, idLetter);
|
||||
getBBC().putInit(BassBoneStoreKey.CHINA_KEY, chinaKey);
|
||||
getBBC().putInit(BassBoneStoreKey.CHINA_VALUE, chinaValue);
|
||||
getBBC().getMapObject(BassBoneStoreKey.MAP_TONE);
|
||||
getBBC().getMapObject(BassBoneStoreKey.MAP_CHINA);
|
||||
GET_BBC().PUT_INIT(BassBoneStoreKey.ID_TONE, idTone);
|
||||
GET_BBC().PUT_INIT(BassBoneStoreKey.ID_LETTER, idLetter);
|
||||
GET_BBC().PUT_INIT(BassBoneStoreKey.CHINA_KEY, chinaKey);
|
||||
GET_BBC().PUT_INIT(BassBoneStoreKey.CHINA_VALUE, chinaValue);
|
||||
GET_BBC().GET_MAP_OBJ(BassBoneStoreKey.MAP_TONE);
|
||||
GET_BBC().GET_MAP_OBJ(BassBoneStoreKey.MAP_CHINA);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BassBoneCoffin getBBC() {
|
||||
public BassBoneCoffin GET_BBC() {
|
||||
return bbc;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -22,16 +22,16 @@ public enum T03PartTrit implements BassBone<T03PartTrit> {
|
|||
private final BassBoneCoffin bbc = BassBoneCoffin.newInstance();
|
||||
|
||||
private T03PartTrit(String idTone, String idLetter, String chinaKey, String chinaValue) {
|
||||
getBBC().putInit(BassBoneStoreKey.ID_TONE, idTone);
|
||||
getBBC().putInit(BassBoneStoreKey.ID_LETTER, idLetter);
|
||||
getBBC().putInit(BassBoneStoreKey.CHINA_KEY, chinaKey);
|
||||
getBBC().putInit(BassBoneStoreKey.CHINA_VALUE, chinaValue);
|
||||
getBBC().getMapObject(BassBoneStoreKey.MAP_TONE);
|
||||
getBBC().getMapObject(BassBoneStoreKey.MAP_CHINA);
|
||||
GET_BBC().PUT_INIT(BassBoneStoreKey.ID_TONE, idTone);
|
||||
GET_BBC().PUT_INIT(BassBoneStoreKey.ID_LETTER, idLetter);
|
||||
GET_BBC().PUT_INIT(BassBoneStoreKey.CHINA_KEY, chinaKey);
|
||||
GET_BBC().PUT_INIT(BassBoneStoreKey.CHINA_VALUE, chinaValue);
|
||||
GET_BBC().GET_MAP_OBJ(BassBoneStoreKey.MAP_TONE);
|
||||
GET_BBC().GET_MAP_OBJ(BassBoneStoreKey.MAP_CHINA);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BassBoneCoffin getBBC() {
|
||||
public BassBoneCoffin GET_BBC() {
|
||||
return bbc;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -25,17 +25,17 @@ public enum T04PartQuad implements BassBoneAlt1<T04PartQuad> {
|
|||
private final BassBoneCoffin bbc = BassBoneCoffin.newInstance();
|
||||
|
||||
private T04PartQuad(String idTone, String idLetter, String chinaKey, String chinaValue, String alt1Value) {
|
||||
getBBC().putInit(BassBoneStoreKey.ID_TONE, idTone);
|
||||
getBBC().putInit(BassBoneStoreKey.ID_LETTER, idLetter);
|
||||
getBBC().putInit(BassBoneStoreKey.CHINA_KEY, chinaKey);
|
||||
getBBC().putInit(BassBoneStoreKey.CHINA_VALUE, chinaValue);
|
||||
getBBC().putInit(BassBoneStoreKey.ALT_1_VALUE, alt1Value);
|
||||
getBBC().getMapObject(BassBoneStoreKey.MAP_TONE);
|
||||
getBBC().getMapObject(BassBoneStoreKey.MAP_CHINA);
|
||||
GET_BBC().PUT_INIT(BassBoneStoreKey.ID_TONE, idTone);
|
||||
GET_BBC().PUT_INIT(BassBoneStoreKey.ID_LETTER, idLetter);
|
||||
GET_BBC().PUT_INIT(BassBoneStoreKey.CHINA_KEY, chinaKey);
|
||||
GET_BBC().PUT_INIT(BassBoneStoreKey.CHINA_VALUE, chinaValue);
|
||||
GET_BBC().PUT_INIT(BassBoneStoreKey.ALT_1_VALUE, alt1Value);
|
||||
GET_BBC().GET_MAP_OBJ(BassBoneStoreKey.MAP_TONE);
|
||||
GET_BBC().GET_MAP_OBJ(BassBoneStoreKey.MAP_CHINA);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BassBoneCoffin getBBC() {
|
||||
public BassBoneCoffin GET_BBC() {
|
||||
return bbc;
|
||||
}
|
||||
|
||||
|
|
|
@ -24,22 +24,18 @@ public enum T05PartPental implements BassBoneAlt2<T05PartPental> {
|
|||
PART_5("˩","4","土","earth","G", "gaia"),
|
||||
;
|
||||
|
||||
public BassBoneCoffin GET_BBC() { return bbc; }
|
||||
public static int LENGTH() { return values().length; };
|
||||
private final BassBoneCoffin bbc = BassBoneCoffin.newInstance();
|
||||
|
||||
private T05PartPental(String idTone, String idLetter, String chinaKey, String chinaValue, String alt1Value, String alt2Value) {
|
||||
getBBC().putInit(BassBoneStoreKey.ID_TONE, idTone);
|
||||
getBBC().putInit(BassBoneStoreKey.ID_LETTER, idLetter);
|
||||
getBBC().putInit(BassBoneStoreKey.CHINA_KEY, chinaKey);
|
||||
getBBC().putInit(BassBoneStoreKey.CHINA_VALUE, chinaValue);
|
||||
getBBC().putInit(BassBoneStoreKey.ALT_1_VALUE, alt1Value);
|
||||
getBBC().putInit(BassBoneStoreKey.ALT_2_VALUE, alt2Value);
|
||||
getBBC().getMapObject(BassBoneStoreKey.MAP_TONE);
|
||||
getBBC().getMapObject(BassBoneStoreKey.MAP_CHINA);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BassBoneCoffin getBBC() {
|
||||
return bbc;
|
||||
GET_BBC().PUT_INIT(BassBoneStoreKey.ID_TONE, idTone);
|
||||
GET_BBC().PUT_INIT(BassBoneStoreKey.ID_LETTER, idLetter);
|
||||
GET_BBC().PUT_INIT(BassBoneStoreKey.CHINA_KEY, chinaKey);
|
||||
GET_BBC().PUT_INIT(BassBoneStoreKey.CHINA_VALUE, chinaValue);
|
||||
GET_BBC().PUT_INIT(BassBoneStoreKey.ALT_1_VALUE, alt1Value);
|
||||
GET_BBC().PUT_INIT(BassBoneStoreKey.ALT_2_VALUE, alt2Value);
|
||||
GET_BBC().GET_MAP_OBJ(BassBoneStoreKey.MAP_TONE);
|
||||
GET_BBC().GET_MAP_OBJ(BassBoneStoreKey.MAP_CHINA);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -29,17 +29,17 @@ public enum T06PartSeximal implements BassBoneAlt1<T06PartSeximal> {
|
|||
private final BassBoneCoffin bbc = BassBoneCoffin.newInstance();
|
||||
|
||||
private T06PartSeximal(String idTone, String idLetter, String chinaKey, String chinaValue, String alt1Value) {
|
||||
getBBC().putInit(BassBoneStoreKey.ID_TONE, idTone);
|
||||
getBBC().putInit(BassBoneStoreKey.ID_LETTER, idLetter);
|
||||
getBBC().putInit(BassBoneStoreKey.CHINA_KEY, chinaKey);
|
||||
getBBC().putInit(BassBoneStoreKey.CHINA_VALUE, chinaValue);
|
||||
getBBC().putInit(BassBoneStoreKey.ALT_1_VALUE, alt1Value);
|
||||
getBBC().getMapObject(BassBoneStoreKey.MAP_TONE);
|
||||
getBBC().getMapObject(BassBoneStoreKey.MAP_CHINA);
|
||||
GET_BBC().PUT_INIT(BassBoneStoreKey.ID_TONE, idTone);
|
||||
GET_BBC().PUT_INIT(BassBoneStoreKey.ID_LETTER, idLetter);
|
||||
GET_BBC().PUT_INIT(BassBoneStoreKey.CHINA_KEY, chinaKey);
|
||||
GET_BBC().PUT_INIT(BassBoneStoreKey.CHINA_VALUE, chinaValue);
|
||||
GET_BBC().PUT_INIT(BassBoneStoreKey.ALT_1_VALUE, alt1Value);
|
||||
GET_BBC().GET_MAP_OBJ(BassBoneStoreKey.MAP_TONE);
|
||||
GET_BBC().GET_MAP_OBJ(BassBoneStoreKey.MAP_CHINA);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BassBoneCoffin getBBC() {
|
||||
public BassBoneCoffin GET_BBC() {
|
||||
return bbc;
|
||||
}
|
||||
|
||||
|
|
|
@ -28,17 +28,17 @@ public enum T07PartPlanIt implements BassBoneAlt1<T07PartPlanIt> {
|
|||
private final BassBoneCoffin bbc = BassBoneCoffin.newInstance();
|
||||
|
||||
private T07PartPlanIt(String idTone, String idLetter, String chinaKey, String chinaValue, String alt1Value) {
|
||||
getBBC().putInit(BassBoneStoreKey.ID_TONE, idTone);
|
||||
getBBC().putInit(BassBoneStoreKey.ID_LETTER, idLetter);
|
||||
getBBC().putInit(BassBoneStoreKey.CHINA_KEY, chinaKey);
|
||||
getBBC().putInit(BassBoneStoreKey.CHINA_VALUE, chinaValue);
|
||||
getBBC().putInit(BassBoneStoreKey.ALT_1_VALUE, alt1Value);
|
||||
getBBC().getMapObject(BassBoneStoreKey.MAP_TONE);
|
||||
getBBC().getMapObject(BassBoneStoreKey.MAP_CHINA);
|
||||
GET_BBC().PUT_INIT(BassBoneStoreKey.ID_TONE, idTone);
|
||||
GET_BBC().PUT_INIT(BassBoneStoreKey.ID_LETTER, idLetter);
|
||||
GET_BBC().PUT_INIT(BassBoneStoreKey.CHINA_KEY, chinaKey);
|
||||
GET_BBC().PUT_INIT(BassBoneStoreKey.CHINA_VALUE, chinaValue);
|
||||
GET_BBC().PUT_INIT(BassBoneStoreKey.ALT_1_VALUE, alt1Value);
|
||||
GET_BBC().GET_MAP_OBJ(BassBoneStoreKey.MAP_TONE);
|
||||
GET_BBC().GET_MAP_OBJ(BassBoneStoreKey.MAP_CHINA);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BassBoneCoffin getBBC() {
|
||||
public BassBoneCoffin GET_BBC() {
|
||||
return bbc;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -34,19 +34,19 @@ public enum T08PartOctal implements BassBoneAlt2<T08PartOctal>,BassBoneShiftBits
|
|||
private final BassBoneCoffin bbc = BassBoneCoffin.newInstance();
|
||||
|
||||
private T08PartOctal(String identifierTone, String identifierLetter, String chinaKey, String chinaValue, String alt1Value, String alt2Value, int shiftBits) {
|
||||
getBBC().putInit(BassBoneStoreKey.ID_TONE, identifierTone);
|
||||
getBBC().putInit(BassBoneStoreKey.ID_LETTER, identifierLetter);
|
||||
getBBC().putInit(BassBoneStoreKey.CHINA_KEY, chinaKey);
|
||||
getBBC().putInit(BassBoneStoreKey.CHINA_VALUE, chinaValue);
|
||||
getBBC().putInit(BassBoneStoreKey.SHIFT_BITS, Integer.valueOf(shiftBits));
|
||||
getBBC().putInit(BassBoneStoreKey.ALT_1_VALUE, alt1Value);
|
||||
getBBC().putInit(BassBoneStoreKey.ALT_2_VALUE, alt2Value);
|
||||
getBBC().getMapObject(BassBoneStoreKey.MAP_TONE);
|
||||
getBBC().getMapObject(BassBoneStoreKey.MAP_CHINA);
|
||||
GET_BBC().PUT_INIT(BassBoneStoreKey.ID_TONE, identifierTone);
|
||||
GET_BBC().PUT_INIT(BassBoneStoreKey.ID_LETTER, identifierLetter);
|
||||
GET_BBC().PUT_INIT(BassBoneStoreKey.CHINA_KEY, chinaKey);
|
||||
GET_BBC().PUT_INIT(BassBoneStoreKey.CHINA_VALUE, chinaValue);
|
||||
GET_BBC().PUT_INIT(BassBoneStoreKey.SHIFT_BITS, Integer.valueOf(shiftBits));
|
||||
GET_BBC().PUT_INIT(BassBoneStoreKey.ALT_1_VALUE, alt1Value);
|
||||
GET_BBC().PUT_INIT(BassBoneStoreKey.ALT_2_VALUE, alt2Value);
|
||||
GET_BBC().GET_MAP_OBJ(BassBoneStoreKey.MAP_TONE);
|
||||
GET_BBC().GET_MAP_OBJ(BassBoneStoreKey.MAP_CHINA);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BassBoneCoffin getBBC() {
|
||||
public BassBoneCoffin GET_BBC() {
|
||||
return bbc;
|
||||
}
|
||||
|
||||
|
|
|
@ -38,20 +38,20 @@ public enum T10PartDecimal implements BassBoneAlt4<T10PartDecimal> {
|
|||
|
||||
private T10PartDecimal(String idTone, String idLetter, String chinaKey, String chinaValue,
|
||||
String alt1Value, String alt2Value, String alt3Value, String alt4Value) {
|
||||
getBBC().putInit(BassBoneStoreKey.ID_TONE, idTone);
|
||||
getBBC().putInit(BassBoneStoreKey.ID_LETTER, idLetter);
|
||||
getBBC().putInit(BassBoneStoreKey.CHINA_KEY, chinaKey);
|
||||
getBBC().putInit(BassBoneStoreKey.CHINA_VALUE, chinaValue);
|
||||
getBBC().putInit(BassBoneStoreKey.ALT_1_VALUE, alt1Value);
|
||||
getBBC().putInit(BassBoneStoreKey.ALT_2_VALUE, alt2Value);
|
||||
getBBC().putInit(BassBoneStoreKey.ALT_3_VALUE, alt3Value);
|
||||
getBBC().putInit(BassBoneStoreKey.ALT_4_VALUE, alt4Value);
|
||||
getBBC().getMapObject(BassBoneStoreKey.MAP_TONE);
|
||||
getBBC().getMapObject(BassBoneStoreKey.MAP_CHINA);
|
||||
GET_BBC().PUT_INIT(BassBoneStoreKey.ID_TONE, idTone);
|
||||
GET_BBC().PUT_INIT(BassBoneStoreKey.ID_LETTER, idLetter);
|
||||
GET_BBC().PUT_INIT(BassBoneStoreKey.CHINA_KEY, chinaKey);
|
||||
GET_BBC().PUT_INIT(BassBoneStoreKey.CHINA_VALUE, chinaValue);
|
||||
GET_BBC().PUT_INIT(BassBoneStoreKey.ALT_1_VALUE, alt1Value);
|
||||
GET_BBC().PUT_INIT(BassBoneStoreKey.ALT_2_VALUE, alt2Value);
|
||||
GET_BBC().PUT_INIT(BassBoneStoreKey.ALT_3_VALUE, alt3Value);
|
||||
GET_BBC().PUT_INIT(BassBoneStoreKey.ALT_4_VALUE, alt4Value);
|
||||
GET_BBC().GET_MAP_OBJ(BassBoneStoreKey.MAP_TONE);
|
||||
GET_BBC().GET_MAP_OBJ(BassBoneStoreKey.MAP_CHINA);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BassBoneCoffin getBBC() {
|
||||
public BassBoneCoffin GET_BBC() {
|
||||
return bbc;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -32,17 +32,17 @@ public enum T11PartUndecimal implements BassBoneAlt1<T11PartUndecimal> {
|
|||
private final BassBoneCoffin bbc = BassBoneCoffin.newInstance();
|
||||
|
||||
private T11PartUndecimal(String idTone, String idLetter, String chinaKey, String chinaValue, String alt1Value) {
|
||||
getBBC().putInit(BassBoneStoreKey.ID_TONE, idTone);
|
||||
getBBC().putInit(BassBoneStoreKey.ID_LETTER, idLetter);
|
||||
getBBC().putInit(BassBoneStoreKey.CHINA_KEY, chinaKey);
|
||||
getBBC().putInit(BassBoneStoreKey.CHINA_VALUE, chinaValue);
|
||||
getBBC().putInit(BassBoneStoreKey.ALT_1_VALUE, alt1Value);
|
||||
getBBC().getMapObject(BassBoneStoreKey.MAP_TONE);
|
||||
getBBC().getMapObject(BassBoneStoreKey.MAP_CHINA);
|
||||
GET_BBC().PUT_INIT(BassBoneStoreKey.ID_TONE, idTone);
|
||||
GET_BBC().PUT_INIT(BassBoneStoreKey.ID_LETTER, idLetter);
|
||||
GET_BBC().PUT_INIT(BassBoneStoreKey.CHINA_KEY, chinaKey);
|
||||
GET_BBC().PUT_INIT(BassBoneStoreKey.CHINA_VALUE, chinaValue);
|
||||
GET_BBC().PUT_INIT(BassBoneStoreKey.ALT_1_VALUE, alt1Value);
|
||||
GET_BBC().GET_MAP_OBJ(BassBoneStoreKey.MAP_TONE);
|
||||
GET_BBC().GET_MAP_OBJ(BassBoneStoreKey.MAP_CHINA);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BassBoneCoffin getBBC() {
|
||||
public BassBoneCoffin GET_BBC() {
|
||||
return bbc;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -33,17 +33,17 @@ public enum T12PartUncial implements BassBoneAlt1<T12PartUncial> {
|
|||
private final BassBoneCoffin bbc = BassBoneCoffin.newInstance();
|
||||
|
||||
private T12PartUncial(String idTone, String idLetter, String chinaKey, String chinaValue, String alt1Value) {
|
||||
getBBC().putInit(BassBoneStoreKey.ID_TONE, idTone);
|
||||
getBBC().putInit(BassBoneStoreKey.ID_LETTER, idLetter);
|
||||
getBBC().putInit(BassBoneStoreKey.CHINA_KEY, chinaKey);
|
||||
getBBC().putInit(BassBoneStoreKey.CHINA_VALUE, chinaValue);
|
||||
getBBC().putInit(BassBoneStoreKey.ALT_1_VALUE, alt1Value);
|
||||
getBBC().getMapObject(BassBoneStoreKey.MAP_TONE);
|
||||
getBBC().getMapObject(BassBoneStoreKey.MAP_CHINA);
|
||||
GET_BBC().PUT_INIT(BassBoneStoreKey.ID_TONE, idTone);
|
||||
GET_BBC().PUT_INIT(BassBoneStoreKey.ID_LETTER, idLetter);
|
||||
GET_BBC().PUT_INIT(BassBoneStoreKey.CHINA_KEY, chinaKey);
|
||||
GET_BBC().PUT_INIT(BassBoneStoreKey.CHINA_VALUE, chinaValue);
|
||||
GET_BBC().PUT_INIT(BassBoneStoreKey.ALT_1_VALUE, alt1Value);
|
||||
GET_BBC().GET_MAP_OBJ(BassBoneStoreKey.MAP_TONE);
|
||||
GET_BBC().GET_MAP_OBJ(BassBoneStoreKey.MAP_CHINA);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BassBoneCoffin getBBC() {
|
||||
public BassBoneCoffin GET_BBC() {
|
||||
return bbc;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -37,17 +37,17 @@ public enum T16PartHex implements BassBoneAlt1<T16PartHex> {
|
|||
private final BassBoneCoffin bbc = BassBoneCoffin.newInstance();
|
||||
|
||||
private T16PartHex(String idTone, String idLetter, String chinaKey, String chinaValue, String alt1Value) {
|
||||
getBBC().putInit(BassBoneStoreKey.ID_TONE, idTone);
|
||||
getBBC().putInit(BassBoneStoreKey.ID_LETTER, idLetter);
|
||||
getBBC().putInit(BassBoneStoreKey.CHINA_KEY, chinaKey);
|
||||
getBBC().putInit(BassBoneStoreKey.CHINA_VALUE, chinaValue);
|
||||
getBBC().putInit(BassBoneStoreKey.ALT_1_VALUE, alt1Value);
|
||||
getBBC().getMapObject(BassBoneStoreKey.MAP_TONE);
|
||||
getBBC().getMapObject(BassBoneStoreKey.MAP_CHINA);
|
||||
GET_BBC().PUT_INIT(BassBoneStoreKey.ID_TONE, idTone);
|
||||
GET_BBC().PUT_INIT(BassBoneStoreKey.ID_LETTER, idLetter);
|
||||
GET_BBC().PUT_INIT(BassBoneStoreKey.CHINA_KEY, chinaKey);
|
||||
GET_BBC().PUT_INIT(BassBoneStoreKey.CHINA_VALUE, chinaValue);
|
||||
GET_BBC().PUT_INIT(BassBoneStoreKey.ALT_1_VALUE, alt1Value);
|
||||
GET_BBC().GET_MAP_OBJ(BassBoneStoreKey.MAP_TONE);
|
||||
GET_BBC().GET_MAP_OBJ(BassBoneStoreKey.MAP_CHINA);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BassBoneCoffin getBBC() {
|
||||
public BassBoneCoffin GET_BBC() {
|
||||
return bbc;
|
||||
}
|
||||
|
||||
|
|
|
@ -53,19 +53,19 @@ public enum T20PartScore implements BassBoneAlt3<T20PartScore> {
|
|||
|
||||
private T20PartScore(String idTone, String idLetter, String chinaKey, String chinaValue,
|
||||
String alt1Value, String alt2Value, String alt3Value) {
|
||||
getBBC().putInit(BassBoneStoreKey.ID_TONE, idTone);
|
||||
getBBC().putInit(BassBoneStoreKey.ID_LETTER, idLetter);
|
||||
getBBC().putInit(BassBoneStoreKey.CHINA_KEY, chinaKey);
|
||||
getBBC().putInit(BassBoneStoreKey.CHINA_VALUE, chinaValue);
|
||||
getBBC().putInit(BassBoneStoreKey.ALT_1_VALUE, alt1Value);
|
||||
getBBC().putInit(BassBoneStoreKey.ALT_2_VALUE, alt2Value);
|
||||
getBBC().putInit(BassBoneStoreKey.ALT_3_VALUE, alt3Value);
|
||||
getBBC().getMapObject(BassBoneStoreKey.MAP_TONE);
|
||||
getBBC().getMapObject(BassBoneStoreKey.MAP_CHINA);
|
||||
GET_BBC().PUT_INIT(BassBoneStoreKey.ID_TONE, idTone);
|
||||
GET_BBC().PUT_INIT(BassBoneStoreKey.ID_LETTER, idLetter);
|
||||
GET_BBC().PUT_INIT(BassBoneStoreKey.CHINA_KEY, chinaKey);
|
||||
GET_BBC().PUT_INIT(BassBoneStoreKey.CHINA_VALUE, chinaValue);
|
||||
GET_BBC().PUT_INIT(BassBoneStoreKey.ALT_1_VALUE, alt1Value);
|
||||
GET_BBC().PUT_INIT(BassBoneStoreKey.ALT_2_VALUE, alt2Value);
|
||||
GET_BBC().PUT_INIT(BassBoneStoreKey.ALT_3_VALUE, alt3Value);
|
||||
GET_BBC().GET_MAP_OBJ(BassBoneStoreKey.MAP_TONE);
|
||||
GET_BBC().GET_MAP_OBJ(BassBoneStoreKey.MAP_CHINA);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BassBoneCoffin getBBC() {
|
||||
public BassBoneCoffin GET_BBC() {
|
||||
return bbc;
|
||||
}
|
||||
|
||||
|
|
|
@ -82,16 +82,16 @@ public enum T60Sexagesimal implements BassBone<T60Sexagesimal> {
|
|||
private final BassBoneCoffin bbc = BassBoneCoffin.newInstance();
|
||||
|
||||
private T60Sexagesimal(String idTone, String idLetter, String chinaKey, String chinaValue) {
|
||||
getBBC().putInit(BassBoneStoreKey.ID_TONE, idTone);
|
||||
getBBC().putInit(BassBoneStoreKey.ID_LETTER, idLetter);
|
||||
getBBC().putInit(BassBoneStoreKey.CHINA_KEY, chinaKey);
|
||||
getBBC().putInit(BassBoneStoreKey.CHINA_VALUE, chinaValue);
|
||||
getBBC().getMapObject(BassBoneStoreKey.MAP_TONE);
|
||||
getBBC().getMapObject(BassBoneStoreKey.MAP_CHINA);
|
||||
GET_BBC().PUT_INIT(BassBoneStoreKey.ID_TONE, idTone);
|
||||
GET_BBC().PUT_INIT(BassBoneStoreKey.ID_LETTER, idLetter);
|
||||
GET_BBC().PUT_INIT(BassBoneStoreKey.CHINA_KEY, chinaKey);
|
||||
GET_BBC().PUT_INIT(BassBoneStoreKey.CHINA_VALUE, chinaValue);
|
||||
GET_BBC().GET_MAP_OBJ(BassBoneStoreKey.MAP_TONE);
|
||||
GET_BBC().GET_MAP_OBJ(BassBoneStoreKey.MAP_CHINA);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BassBoneCoffin getBBC() {
|
||||
public BassBoneCoffin GET_BBC() {
|
||||
return bbc;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,31 +8,31 @@ import java.util.stream.Collectors;
|
|||
*
|
||||
* @author willemtsade ©Δ∞ 仙上主天
|
||||
*/
|
||||
public interface BassBone<T extends BassBone<T>> extends BassBoneEnum<T>, BassBoneStore {
|
||||
public interface BassBone<T extends BassBone<T>> extends BassBoneEnumSet<T>, BassBoneStore {
|
||||
|
||||
default String staticBoneNaam() {
|
||||
return getClass().getAnnotation(BassBoneName.class).value();
|
||||
}
|
||||
|
||||
default String getIdentifierTone() {
|
||||
return getBBC().getString(BassBoneStoreKey.ID_TONE);
|
||||
return GET_BBC().GET_STR(BassBoneStoreKey.ID_TONE);
|
||||
}
|
||||
|
||||
default String getIdentifierLetter() {
|
||||
return getBBC().getString(BassBoneStoreKey.ID_LETTER);
|
||||
return GET_BBC().GET_STR(BassBoneStoreKey.ID_LETTER);
|
||||
}
|
||||
|
||||
default String getChinaKey() {
|
||||
return getBBC().getString(BassBoneStoreKey.CHINA_KEY);
|
||||
return GET_BBC().GET_STR(BassBoneStoreKey.CHINA_KEY);
|
||||
}
|
||||
|
||||
default String getChinaValue() {
|
||||
return getBBC().getString(BassBoneStoreKey.CHINA_VALUE);
|
||||
return GET_BBC().GET_STR(BassBoneStoreKey.CHINA_VALUE);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
default T staticValueOfTone(String identifierTone) {
|
||||
Map<String,Object> mapTone = getBBC().getMapObject(BassBoneStoreKey.MAP_TONE);
|
||||
Map<String,Object> mapTone = GET_BBC().GET_MAP_OBJ(BassBoneStoreKey.MAP_TONE);
|
||||
if (mapTone.isEmpty()) {
|
||||
mapTone.putAll(staticInstancesStream().collect(Collectors.toMap(v -> v.getIdentifierTone(), v -> v)));
|
||||
}
|
||||
|
@ -41,7 +41,7 @@ public interface BassBone<T extends BassBone<T>> extends BassBoneEnum<T>, BassBo
|
|||
|
||||
@SuppressWarnings("unchecked")
|
||||
default T staticValueOfChina(String chinaKey) {
|
||||
Map<String,Object> mapChina = getBBC().getMapObject(BassBoneStoreKey.MAP_CHINA);
|
||||
Map<String,Object> mapChina = GET_BBC().GET_MAP_OBJ(BassBoneStoreKey.MAP_CHINA);
|
||||
if (mapChina.isEmpty()) {
|
||||
mapChina.putAll(staticInstancesStream().collect(Collectors.toMap(v -> v.getChinaKey(), v -> v)));
|
||||
}
|
||||
|
|
|
@ -8,7 +8,7 @@ package love.distributedrebirth.numberxd.base2t.bone;
|
|||
public interface BassBoneAlt1<T extends BassBone<T>> extends BassBone<T> {
|
||||
|
||||
default String getAlt1Value() {
|
||||
return getBBC().getString(BassBoneStoreKey.ALT_1_VALUE);
|
||||
return GET_BBC().GET_STR(BassBoneStoreKey.ALT_1_VALUE);
|
||||
}
|
||||
|
||||
default String staticAlt1Name() {
|
||||
|
|
|
@ -8,7 +8,7 @@ package love.distributedrebirth.numberxd.base2t.bone;
|
|||
public interface BassBoneAlt2<T extends BassBone<T>> extends BassBoneAlt1<T> {
|
||||
|
||||
default String getAlt2Value() {
|
||||
return getBBC().getString(BassBoneStoreKey.ALT_2_VALUE);
|
||||
return GET_BBC().GET_STR(BassBoneStoreKey.ALT_2_VALUE);
|
||||
}
|
||||
|
||||
default String staticAlt2Name() {
|
||||
|
|
|
@ -8,7 +8,7 @@ package love.distributedrebirth.numberxd.base2t.bone;
|
|||
public interface BassBoneAlt3<T extends BassBone<T>> extends BassBoneAlt2<T> {
|
||||
|
||||
default String getAlt3Value() {
|
||||
return getBBC().getString(BassBoneStoreKey.ALT_3_VALUE);
|
||||
return GET_BBC().GET_STR(BassBoneStoreKey.ALT_3_VALUE);
|
||||
}
|
||||
|
||||
default String staticAlt3Name() {
|
||||
|
|
|
@ -8,7 +8,7 @@ package love.distributedrebirth.numberxd.base2t.bone;
|
|||
public interface BassBoneAlt4<T extends BassBone<T>> extends BassBoneAlt3<T> {
|
||||
|
||||
default String getAlt4Value() {
|
||||
return getBBC().getString(BassBoneStoreKey.ALT_4_VALUE);
|
||||
return GET_BBC().GET_STR(BassBoneStoreKey.ALT_4_VALUE);
|
||||
}
|
||||
|
||||
default String staticAlt4Name() {
|
||||
|
|
|
@ -5,40 +5,40 @@ import java.util.Map;
|
|||
|
||||
public interface BassBoneCoffin {
|
||||
|
||||
Object putInit(BassBoneStoreKey key, Object value);
|
||||
Object PUT_INIT(BassBoneStoreKey key, Object value);
|
||||
|
||||
Object get(BassBoneStoreKey key);
|
||||
Object GET(BassBoneStoreKey key);
|
||||
|
||||
default String getString(BassBoneStoreKey key) {
|
||||
return String.class.cast(get(key));
|
||||
default String GET_STR(BassBoneStoreKey key) {
|
||||
return String.class.cast(GET(key));
|
||||
}
|
||||
|
||||
default Integer getInteger(BassBoneStoreKey key) {
|
||||
return Integer.class.cast(get(key));
|
||||
default Integer GET_INT(BassBoneStoreKey key) {
|
||||
return Integer.class.cast(GET(key));
|
||||
}
|
||||
|
||||
default Long getLong(BassBoneStoreKey key) {
|
||||
return Long.class.cast(get(key));
|
||||
default Long GET_LONG(BassBoneStoreKey key) {
|
||||
return Long.class.cast(GET(key));
|
||||
}
|
||||
|
||||
default Boolean getBoolean(BassBoneStoreKey key) {
|
||||
return Boolean.class.cast(get(key));
|
||||
default Boolean GET_BOOL(BassBoneStoreKey key) {
|
||||
return Boolean.class.cast(GET(key));
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
default Map<String,Object> getMapObject(BassBoneStoreKey key) {
|
||||
if (get(key) == null) {
|
||||
putInit(key, new HashMap<>());
|
||||
default Map<String,Object> GET_MAP_OBJ(BassBoneStoreKey key) {
|
||||
if (GET(key) == null) {
|
||||
PUT_INIT(key, new HashMap<>());
|
||||
}
|
||||
return Map.class.cast(get(key));
|
||||
return Map.class.cast(GET(key));
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
default Map<String,String> getMapString(BassBoneStoreKey key) {
|
||||
if (get(key) == null) {
|
||||
putInit(key, new HashMap<>());
|
||||
default Map<String,String> GET_MAP_STR(BassBoneStoreKey key) {
|
||||
if (GET(key) == null) {
|
||||
PUT_INIT(key, new HashMap<>());
|
||||
}
|
||||
return Map.class.cast(get(key));
|
||||
return Map.class.cast(GET(key));
|
||||
}
|
||||
|
||||
static BassBoneCoffin newInstance() {
|
||||
|
@ -46,12 +46,12 @@ public interface BassBoneCoffin {
|
|||
final Map<BassBoneStoreKey,Object> initMap = new HashMap<>();
|
||||
|
||||
@Override
|
||||
public Object get(BassBoneStoreKey key) {
|
||||
public Object GET(BassBoneStoreKey key) {
|
||||
return initMap.get(key);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object putInit(BassBoneStoreKey key, Object value) {
|
||||
public Object PUT_INIT(BassBoneStoreKey key, Object value) {
|
||||
return initMap.put(key, value);
|
||||
}
|
||||
};
|
||||
|
|
|
@ -1,11 +1,5 @@
|
|||
package love.distributedrebirth.numberxd.base2t.bone;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.function.Consumer;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
|
@ -20,62 +14,4 @@ public interface BassBoneEnum<T> {
|
|||
default String naam() {
|
||||
return name(); // Deutsche code
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
default T[] staticInstances() {
|
||||
try {
|
||||
Object result = getClass().getMethod("values").invoke(null);
|
||||
return (T[]) result;
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
||||
default List<T> staticInstancesList() {
|
||||
return Arrays.asList(staticInstances());
|
||||
}
|
||||
|
||||
default Iterator<T> staticInstancesIterator() {
|
||||
return staticInstancesList().iterator();
|
||||
}
|
||||
|
||||
default Stream<T> staticInstancesStream() {
|
||||
return staticInstancesList().stream();
|
||||
}
|
||||
|
||||
default T volgende() {
|
||||
T[] values = staticInstances();
|
||||
int resultIndex = 0;
|
||||
for (int i=0;i<values.length;i++) {
|
||||
if (this == values[i]) {
|
||||
resultIndex = i + 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (resultIndex == values.length) {
|
||||
resultIndex = 0;
|
||||
}
|
||||
return values[resultIndex];
|
||||
}
|
||||
|
||||
default T vorige() {
|
||||
T[] values = staticInstances();
|
||||
int resultIndex = 0;
|
||||
for (int i=0;i<values.length;i++) {
|
||||
if (this == values[i]) {
|
||||
resultIndex = i - 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (resultIndex < 0) {
|
||||
resultIndex = values.length - 1;
|
||||
}
|
||||
return values[resultIndex];
|
||||
}
|
||||
|
||||
default void staticVoorElk(Consumer<T> consumer) {
|
||||
for (T value:staticInstances()) {
|
||||
consumer.accept(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,73 @@
|
|||
package love.distributedrebirth.numberxd.base2t.bone;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.function.Consumer;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author willemtsade ©Δ∞ 仙上主天
|
||||
*/
|
||||
public interface BassBoneEnumSet<T> extends BassBoneEnum<T> {
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
default T[] staticInstances() {
|
||||
try {
|
||||
Object result = getClass().getMethod("values").invoke(null);
|
||||
return (T[]) result;
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
||||
default List<T> staticInstancesList() {
|
||||
return Arrays.asList(staticInstances());
|
||||
}
|
||||
|
||||
default Iterator<T> staticInstancesIterator() {
|
||||
return staticInstancesList().iterator();
|
||||
}
|
||||
|
||||
default Stream<T> staticInstancesStream() {
|
||||
return staticInstancesList().stream();
|
||||
}
|
||||
|
||||
default T volgende() {
|
||||
T[] values = staticInstances();
|
||||
int resultIndex = 0;
|
||||
for (int i=0;i<values.length;i++) {
|
||||
if (this == values[i]) {
|
||||
resultIndex = i + 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (resultIndex == values.length) {
|
||||
resultIndex = 0;
|
||||
}
|
||||
return values[resultIndex];
|
||||
}
|
||||
|
||||
default T vorige() {
|
||||
T[] values = staticInstances();
|
||||
int resultIndex = 0;
|
||||
for (int i=0;i<values.length;i++) {
|
||||
if (this == values[i]) {
|
||||
resultIndex = i - 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (resultIndex < 0) {
|
||||
resultIndex = values.length - 1;
|
||||
}
|
||||
return values[resultIndex];
|
||||
}
|
||||
|
||||
default void staticVoorElk(Consumer<T> consumer) {
|
||||
for (T value:staticInstances()) {
|
||||
consumer.accept(value);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -8,6 +8,6 @@ package love.distributedrebirth.numberxd.base2t.bone;
|
|||
public interface BassBoneShiftBits<T extends BassBone<T>> extends BassBone<T> {
|
||||
|
||||
default Integer getShiftBits() {
|
||||
return getBBC().getInteger(BassBoneStoreKey.SHIFT_BITS);
|
||||
return GET_BBC().GET_INT(BassBoneStoreKey.SHIFT_BITS);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7,5 +7,5 @@ package love.distributedrebirth.numberxd.base2t.bone;
|
|||
*/
|
||||
public interface BassBoneStore {
|
||||
|
||||
BassBoneCoffin getBBC();
|
||||
BassBoneCoffin GET_BBC();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue