From ac1e1e5c43d37abc44c74dbfb65d6923dbebddab Mon Sep 17 00:00:00 2001 From: Willem Date: Mon, 24 Oct 2022 03:57:39 +0200 Subject: [PATCH] Replacement for java.lang.String is needed --- .../gdxapp4d/app/notepad/NotepadDeskApp.java | 4 +- .../bassboon/clazz/BãßBȍőnAuthorʸᴰ.java | 6 +- .../clazz/BãßBȍőnDuytsFlüsternʸᴰ.java | 4 +- .../bassboon/clazz/BãßBȍőnExportʸᴰ.java | 6 +- .../bassboon/death/BãßBȍőnCoffinGhost.java | 39 +-- .../death/BãßBȍőnCoffinGhostSpell.java | 7 +- .../death/BãßBȍőnCoffinGhostSpellLock.java | 15 +- .../bassboon/death/GhostKey鬼鑰匙.java | 50 --- .../bassboon/jpp/lang/StringDEC6B.java | 68 ++-- .../bassboon/jpp/lang/StringGhostKey.java | 45 +++ .../bassboon/jpp/lang/StringProxy.java | 205 ------------ .../bassboon/jpp/lang/StringTweet.java | 2 +- .../bassboon/jpp/lang/StringType.java | 143 +++++++++ .../bassboon/jpp/lang/StringTypeConst.java | 299 ++++++++++++++++++ .../bassboon/jpp/lang/StringUnicode.java | 23 +- .../bassboon/jpp/lang/number/NumberValue.java | 41 ++- .../number/matrix/BãßBȍőnNumberMatrixʸᴰ.java | 6 +- .../yd/abacus/BãßBȍőnAbacusEnumBaseʸᴰ.java | 10 +- .../abacus/zombie/BãßBȍőnAbacusZombieʸᴰ.java | 4 +- .../bassboon/yd/jmx/BãßBȍőnMBeanServerʸᴰ.java | 4 +- .../jpp/lang/NumberMatrixFactoryTest.java | 4 +- .../bassboon/jpp/lang/StringTweetTest.java | 9 +- .../bassboon/jpp/lang/StringUnicodeTest.java | 64 ++-- .../base2t/part/BãßBȍőnPartAlt1ʸᴰ.java | 6 +- .../base2t/part/BãßBȍőnPartAlt2ʸᴰ.java | 6 +- .../base2t/part/BãßBȍőnPartAlt3ʸᴰ.java | 6 +- .../base2t/part/BãßBȍőnPartAlt4ʸᴰ.java | 6 +- 27 files changed, 692 insertions(+), 390 deletions(-) delete mode 100644 gdxapp4d-lib-bassboonyd/src/main/java/love/distributedrebirth/bassboon/death/GhostKey鬼鑰匙.java create mode 100644 gdxapp4d-lib-bassboonyd/src/main/java/love/distributedrebirth/bassboon/jpp/lang/StringGhostKey.java delete mode 100644 gdxapp4d-lib-bassboonyd/src/main/java/love/distributedrebirth/bassboon/jpp/lang/StringProxy.java create mode 100644 gdxapp4d-lib-bassboonyd/src/main/java/love/distributedrebirth/bassboon/jpp/lang/StringType.java create mode 100644 gdxapp4d-lib-bassboonyd/src/main/java/love/distributedrebirth/bassboon/jpp/lang/StringTypeConst.java diff --git a/gdxapp4d-app-notepad/src/main/java/love/distributedrebirth/gdxapp4d/app/notepad/NotepadDeskApp.java b/gdxapp4d-app-notepad/src/main/java/love/distributedrebirth/gdxapp4d/app/notepad/NotepadDeskApp.java index bfd2a44d..1e39b596 100644 --- a/gdxapp4d-app-notepad/src/main/java/love/distributedrebirth/gdxapp4d/app/notepad/NotepadDeskApp.java +++ b/gdxapp4d-app-notepad/src/main/java/love/distributedrebirth/gdxapp4d/app/notepad/NotepadDeskApp.java @@ -13,9 +13,9 @@ import love.distributedrebirth.bassboon.Bãß; import love.distributedrebirth.bassboon.DefaultBãßBȍőnʸᴰ; import love.distributedrebirth.bassboon.clazz.BãßBȍőnAuthor注; import love.distributedrebirth.bassboon.clazz.pirate.BãßBȍőnꝐŕḯṿª₮ḕ; -import love.distributedrebirth.bassboon.death.GhostKey鬼鑰匙; import love.distributedrebirth.bassboon.death.spider.BãßBȍőnSpiderEgg注; import love.distributedrebirth.bassboon.death.spider.BãßBȍőnSpiderWire注; +import love.distributedrebirth.bassboon.jpp.lang.StringGhostKey; import love.distributedrebirth.gdxapp4d.vrgem4.service.VrGem4Unicode4DService; import love.distributedrebirth.gdxapp4d.vrgem4.service.deskapp.AbstractDeskApp; import love.distributedrebirth.gdxapp4d.vrgem4.service.deskapp.DeskAppContourSection; @@ -45,7 +45,7 @@ public class NotepadDeskApp extends AbstractDeskApp implements DeskAppRenderer, }; public static final class Ꝑŕḯṿª₮ḕ implements BãßBȍőnꝐŕḯṿª₮ḕ> { - private static final GhostKey鬼鑰匙 GHOST_BUNDLE = GhostKey鬼鑰匙.asciiᴳʰᵒˢᵗ(); + private static final StringGhostKey GHOST_BUNDLE = StringGhostKey.asciiᴳʰᵒˢᵗ(); @BãßBȍőnSpiderEgg注() public VrGem4Unicode4DService locateVrGem4Unicode4DService(DefaultBãßBȍőnʸᴰ boon) { diff --git a/gdxapp4d-lib-bassboonyd/src/main/java/love/distributedrebirth/bassboon/clazz/BãßBȍőnAuthorʸᴰ.java b/gdxapp4d-lib-bassboonyd/src/main/java/love/distributedrebirth/bassboon/clazz/BãßBȍőnAuthorʸᴰ.java index 97877d85..a5cd5c18 100644 --- a/gdxapp4d-lib-bassboonyd/src/main/java/love/distributedrebirth/bassboon/clazz/BãßBȍőnAuthorʸᴰ.java +++ b/gdxapp4d-lib-bassboonyd/src/main/java/love/distributedrebirth/bassboon/clazz/BãßBȍőnAuthorʸᴰ.java @@ -4,8 +4,8 @@ import love.distributedrebirth.bassboon.BãßBȍőnʸᴰ; import love.distributedrebirth.bassboon.clazz.pirate.BãßBȍőnPiratePhase注; import love.distributedrebirth.bassboon.clazz.pirate.BãßBȍőnPirateʸᴰ; import love.distributedrebirth.bassboon.clazz.pirate.BãßBȍőnꝐŕḯṿª₮ḕ; -import love.distributedrebirth.bassboon.death.GhostKey鬼鑰匙; import love.distributedrebirth.bassboon.death.spider.BãßBȍőnSpiderWire注; +import love.distributedrebirth.bassboon.jpp.lang.StringGhostKey; @BãßBȍőnAuthor注(name = "للَّٰهِilLצسُو", copyright = "©Δ∞ 仙上主天") @BãßBȍőnAnnotation注(optional = {BãßBȍőnAuthor注.class}) @@ -13,8 +13,8 @@ public interface BãßBȍőnAuthorʸᴰ> extends B @BãßBȍőnPiratePhase注(dependencies = {BãßBȍőnPirateʸᴰ.βrahmanBoonLaw.class}) public static final class Ꝑŕḯṿª₮ḕ implements BãßBȍőnꝐŕḯṿª₮ḕ> { - private static final GhostKey鬼鑰匙 GHOST_NAME = GhostKey鬼鑰匙.asciiᴳʰᵒˢᵗ(); - private static final GhostKey鬼鑰匙 GHOST_COPYRIGHT = GhostKey鬼鑰匙.asciiᴳʰᵒˢᵗ(); + private static final StringGhostKey GHOST_NAME = StringGhostKey.asciiᴳʰᵒˢᵗ(); + private static final StringGhostKey GHOST_COPYRIGHT = StringGhostKey.asciiᴳʰᵒˢᵗ(); private static final String DEFAULT_NAME = "奴隸來自 仙上主天"; private static final String DEFAULT_COPYRIGHT = "©Δ∞ 仙上主天"; diff --git a/gdxapp4d-lib-bassboonyd/src/main/java/love/distributedrebirth/bassboon/clazz/BãßBȍőnDuytsFlüsternʸᴰ.java b/gdxapp4d-lib-bassboonyd/src/main/java/love/distributedrebirth/bassboon/clazz/BãßBȍőnDuytsFlüsternʸᴰ.java index 93f63648..887d4ff0 100644 --- a/gdxapp4d-lib-bassboonyd/src/main/java/love/distributedrebirth/bassboon/clazz/BãßBȍőnDuytsFlüsternʸᴰ.java +++ b/gdxapp4d-lib-bassboonyd/src/main/java/love/distributedrebirth/bassboon/clazz/BãßBȍőnDuytsFlüsternʸᴰ.java @@ -4,8 +4,8 @@ import love.distributedrebirth.bassboon.BãßBȍőnʸᴰ; import love.distributedrebirth.bassboon.clazz.pirate.BãßBȍőnPiratePhase注; import love.distributedrebirth.bassboon.clazz.pirate.BãßBȍőnPirateʸᴰ; import love.distributedrebirth.bassboon.clazz.pirate.BãßBȍőnꝐŕḯṿª₮ḕ; -import love.distributedrebirth.bassboon.death.GhostKey鬼鑰匙; import love.distributedrebirth.bassboon.death.spider.BãßBȍőnSpiderWire注; +import love.distributedrebirth.bassboon.jpp.lang.StringGhostKey; @BãßBȍőnAuthor注(name = "للَّٰهِilLצسُو", copyright = "©Δ∞ 仙上主天") @BãßBȍőnAnnotation注(optional = {BãßBȍőnDuytsFlüstern注.class}) @@ -13,7 +13,7 @@ public interface BãßBȍőnDuytsFlüsternʸᴰ> e @BãßBȍőnPiratePhase注(dependencies = {BãßBȍőnPirateʸᴰ.βrahmanBoonLaw.class}) final class Ꝑŕḯṿª₮ḕ implements BãßBȍőnꝐŕḯṿª₮ḕ> { - private static final GhostKey鬼鑰匙 GHOST_PURPOSE = GhostKey鬼鑰匙.asciiᴳʰᵒˢᵗ(); + private static final StringGhostKey GHOST_PURPOSE = StringGhostKey.asciiᴳʰᵒˢᵗ(); private static final String DEFAULT_PURPOSE = "Undefined"; @BãßBȍőnSpiderWire注 diff --git a/gdxapp4d-lib-bassboonyd/src/main/java/love/distributedrebirth/bassboon/clazz/BãßBȍőnExportʸᴰ.java b/gdxapp4d-lib-bassboonyd/src/main/java/love/distributedrebirth/bassboon/clazz/BãßBȍőnExportʸᴰ.java index a8a6bfe8..d13b93b1 100644 --- a/gdxapp4d-lib-bassboonyd/src/main/java/love/distributedrebirth/bassboon/clazz/BãßBȍőnExportʸᴰ.java +++ b/gdxapp4d-lib-bassboonyd/src/main/java/love/distributedrebirth/bassboon/clazz/BãßBȍőnExportʸᴰ.java @@ -5,8 +5,8 @@ import love.distributedrebirth.bassboon.clazz.pirate.BãßBȍőnPiratePhase注; import love.distributedrebirth.bassboon.clazz.pirate.BãßBȍőnPirateʸᴰ; import love.distributedrebirth.bassboon.clazz.pirate.BãßBȍőnꝐŕḯṿª₮ḕ; import love.distributedrebirth.bassboon.death.BãßBȍőnCoffinDuytschenᵗˣᵗ; -import love.distributedrebirth.bassboon.death.GhostKey鬼鑰匙; import love.distributedrebirth.bassboon.death.spider.BãßBȍőnSpiderWire注; +import love.distributedrebirth.bassboon.jpp.lang.StringGhostKey; @BãßBȍőnAuthor注(name = "للَّٰهِilLצسُو", copyright = "©Δ∞ 仙上主天") @BãßBȍőnAnnotation注(optional = {BãßBȍőnExport注.class}) @@ -14,8 +14,8 @@ public interface BãßBȍőnExportʸᴰ> extends B @BãßBȍőnPiratePhase注(dependencies = {BãßBȍőnPirateʸᴰ.βrahmanBoonLaw.class}) final class Ꝑŕḯṿª₮ḕ implements BãßBȍőnꝐŕḯṿª₮ḕ> { - private static final GhostKey鬼鑰匙 GHOST_ARTIFACT = GhostKey鬼鑰匙.asciiᴳʰᵒˢᵗ(); - private static final GhostKey鬼鑰匙 GHOST_GROUP = GhostKey鬼鑰匙.asciiᴳʰᵒˢᵗ(); + private static final StringGhostKey GHOST_ARTIFACT = StringGhostKey.asciiᴳʰᵒˢᵗ(); + private static final StringGhostKey GHOST_GROUP = StringGhostKey.asciiᴳʰᵒˢᵗ(); @BãßBȍőnSpiderWire注 private BãßBȍőnExportʸᴰ boon; diff --git a/gdxapp4d-lib-bassboonyd/src/main/java/love/distributedrebirth/bassboon/death/BãßBȍőnCoffinGhost.java b/gdxapp4d-lib-bassboonyd/src/main/java/love/distributedrebirth/bassboon/death/BãßBȍőnCoffinGhost.java index ba9174ff..022f102c 100644 --- a/gdxapp4d-lib-bassboonyd/src/main/java/love/distributedrebirth/bassboon/death/BãßBȍőnCoffinGhost.java +++ b/gdxapp4d-lib-bassboonyd/src/main/java/love/distributedrebirth/bassboon/death/BãßBȍőnCoffinGhost.java @@ -4,88 +4,89 @@ import java.util.List; import java.util.Map; import love.distributedrebirth.bassboon.clazz.BãßBȍőnAuthor注; +import love.distributedrebirth.bassboon.jpp.lang.StringGhostKey; @BãßBȍőnAuthor注(name = "للَّٰهِilLצسُو", copyright = "©Δ∞ 仙上主天") public interface BãßBȍőnCoffinGhost { - Object GHOST_OBJ(GhostKey鬼鑰匙 key); + Object GHOST_OBJ(StringGhostKey key); @SuppressWarnings("unchecked") - default Y GHOST_OBJ(GhostKey鬼鑰匙 key, Class type) { + default Y GHOST_OBJ(StringGhostKey key, Class type) { return (Y) GHOST_OBJ(key); } - default String GHOST_STR(GhostKey鬼鑰匙 key) { + default String GHOST_STR(StringGhostKey key) { return String.class.cast(GHOST_OBJ(key)); } - default Short GHOST_SHORT(GhostKey鬼鑰匙 key) { + default Short GHOST_SHORT(StringGhostKey key) { return Short.class.cast(GHOST_OBJ(key)); } - default Character GHOST_CHAR(GhostKey鬼鑰匙 key) { + default Character GHOST_CHAR(StringGhostKey key) { return Character.class.cast(GHOST_OBJ(key)); } - default Integer GHOST_INT(GhostKey鬼鑰匙 key) { + default Integer GHOST_INT(StringGhostKey key) { return Integer.class.cast(GHOST_OBJ(key)); } - default Long GHOST_LONG(GhostKey鬼鑰匙 key) { + default Long GHOST_LONG(StringGhostKey key) { return Long.class.cast(GHOST_OBJ(key)); } - default Boolean GHOST_BOOL(GhostKey鬼鑰匙 key) { + default Boolean GHOST_BOOL(StringGhostKey key) { return Boolean.class.cast(GHOST_OBJ(key)); } - default Float GHOST_FLOAT(GhostKey鬼鑰匙 key) { + default Float GHOST_FLOAT(StringGhostKey key) { return Float.class.cast(GHOST_OBJ(key)); } - default Double GHOST_DOUBLE(GhostKey鬼鑰匙 key) { + default Double GHOST_DOUBLE(StringGhostKey key) { return Double.class.cast(GHOST_OBJ(key)); } @SuppressWarnings("unchecked") - default Map GHOST_MAP_OBJ(GhostKey鬼鑰匙 key) { + default Map GHOST_MAP_OBJ(StringGhostKey key) { return Map.class.cast(GHOST_OBJ(key)); } - default Object GHOST_MAP_OBJ_VALUE(GhostKey鬼鑰匙 key, String mapKey) { + default Object GHOST_MAP_OBJ_VALUE(StringGhostKey key, String mapKey) { return GHOST_MAP_OBJ(key).get(mapKey); } @SuppressWarnings("unchecked") - default Map GHOST_MAP_STR(GhostKey鬼鑰匙 key) { + default Map GHOST_MAP_STR(StringGhostKey key) { return Map.class.cast(GHOST_OBJ(key)); } - default String GHOST_MAP_STR_VALUE(GhostKey鬼鑰匙 key, String mapKey) { + default String GHOST_MAP_STR_VALUE(StringGhostKey key, String mapKey) { return GHOST_MAP_STR(key).get(mapKey); } @SuppressWarnings("unchecked") - default Map GHOST_MAP_INT(GhostKey鬼鑰匙 key) { + default Map GHOST_MAP_INT(StringGhostKey key) { return Map.class.cast(GHOST_OBJ(key)); } - default Integer GHOST_MAP_INT_VALUE(GhostKey鬼鑰匙 key, String mapKey) { + default Integer GHOST_MAP_INT_VALUE(StringGhostKey key, String mapKey) { return GHOST_MAP_INT(key).get(mapKey); } @SuppressWarnings("unchecked") - default List GHOST_LIST_OBJ(GhostKey鬼鑰匙 key) { + default List GHOST_LIST_OBJ(StringGhostKey key) { return List.class.cast(GHOST_OBJ(key)); } @SuppressWarnings("unchecked") - default List GHOST_LIST_STR(GhostKey鬼鑰匙 key) { + default List GHOST_LIST_STR(StringGhostKey key) { return List.class.cast(GHOST_OBJ(key)); } @SuppressWarnings("unchecked") - default List GHOST_LIST_INT(GhostKey鬼鑰匙 key) { + default List GHOST_LIST_INT(StringGhostKey key) { return List.class.cast(GHOST_OBJ(key)); } } diff --git a/gdxapp4d-lib-bassboonyd/src/main/java/love/distributedrebirth/bassboon/death/BãßBȍőnCoffinGhostSpell.java b/gdxapp4d-lib-bassboonyd/src/main/java/love/distributedrebirth/bassboon/death/BãßBȍőnCoffinGhostSpell.java index be5cd77f..836c6371 100644 --- a/gdxapp4d-lib-bassboonyd/src/main/java/love/distributedrebirth/bassboon/death/BãßBȍőnCoffinGhostSpell.java +++ b/gdxapp4d-lib-bassboonyd/src/main/java/love/distributedrebirth/bassboon/death/BãßBȍőnCoffinGhostSpell.java @@ -4,17 +4,18 @@ import java.util.ArrayList; import java.util.HashMap; import love.distributedrebirth.bassboon.clazz.BãßBȍőnAuthor注; +import love.distributedrebirth.bassboon.jpp.lang.StringGhostKey; @BãßBȍőnAuthor注(name = "للَّٰهِilLצسُو", copyright = "©Δ∞ 仙上主天") public interface BãßBȍőnCoffinGhostSpell extends BãßBȍőnCoffinGhost { - Object PUT_GHOST(GhostKey鬼鑰匙 key, Object value); + Object PUT_GHOST(StringGhostKey key, Object value); - default void PUT_GHOST_MAP(GhostKey鬼鑰匙 key) { + default void PUT_GHOST_MAP(StringGhostKey key) { PUT_GHOST(key, new HashMap<>()); } - default void PUT_GHOST_LIST(GhostKey鬼鑰匙 key) { + default void PUT_GHOST_LIST(StringGhostKey key) { PUT_GHOST(key, new ArrayList<>()); } diff --git a/gdxapp4d-lib-bassboonyd/src/main/java/love/distributedrebirth/bassboon/death/BãßBȍőnCoffinGhostSpellLock.java b/gdxapp4d-lib-bassboonyd/src/main/java/love/distributedrebirth/bassboon/death/BãßBȍőnCoffinGhostSpellLock.java index 9f94f65b..7f0366c6 100644 --- a/gdxapp4d-lib-bassboonyd/src/main/java/love/distributedrebirth/bassboon/death/BãßBȍőnCoffinGhostSpellLock.java +++ b/gdxapp4d-lib-bassboonyd/src/main/java/love/distributedrebirth/bassboon/death/BãßBȍőnCoffinGhostSpellLock.java @@ -7,6 +7,7 @@ import java.util.Map; import java.util.function.Function; import love.distributedrebirth.bassboon.clazz.BãßBȍőnAuthor注; +import love.distributedrebirth.bassboon.jpp.lang.StringGhostKey; @BãßBȍőnAuthor注(name = "للَّٰهِilLצسُو", copyright = "©Δ∞ 仙上主天") public interface BãßBȍőnCoffinGhostSpellLock extends BãßBȍőnCoffinGhostSpell { @@ -18,9 +19,9 @@ public interface BãßBȍőnCoffinGhostSpellLock extends BãßBȍőnCoffinGhostS } static BãßBȍőnCoffinGhostSpellLock instanceᴺᵉʷ() { - Function,BãßBȍőnCoffinGhost> keyMaker = v -> { - Map summonedGhosts = new HashMap<>(v); - for (GhostKey鬼鑰匙 entity:v.keySet()) { + Function,BãßBȍőnCoffinGhost> keyMaker = v -> { + Map summonedGhosts = new HashMap<>(v); + for (StringGhostKey entity:v.keySet()) { Object spirit = summonedGhosts.get(entity); if (spirit instanceof List) { summonedGhosts.put(entity, Collections.unmodifiableList((List) spirit)); @@ -31,13 +32,13 @@ public interface BãßBȍőnCoffinGhostSpellLock extends BãßBȍőnCoffinGhostS } return new BãßBȍőnCoffinGhost() { @Override - public Object GHOST_OBJ(GhostKey鬼鑰匙 key) { + public Object GHOST_OBJ(StringGhostKey key) { return summonedGhosts.get(key); } }; }; return new BãßBȍőnCoffinGhostSpellLock() { - private final Map ouijaBoard = new HashMap<>(); + private final Map ouijaBoard = new HashMap<>(); @Override public BãßBȍőnCoffinGhost LOCK() { @@ -45,12 +46,12 @@ public interface BãßBȍőnCoffinGhostSpellLock extends BãßBȍőnCoffinGhostS } @Override - public Object GHOST_OBJ(GhostKey鬼鑰匙 key) { + public Object GHOST_OBJ(StringGhostKey key) { return ouijaBoard.get(key); } @Override - public Object PUT_GHOST(GhostKey鬼鑰匙 key, Object value) { + public Object PUT_GHOST(StringGhostKey key, Object value) { return ouijaBoard.put(key, value); } }; diff --git a/gdxapp4d-lib-bassboonyd/src/main/java/love/distributedrebirth/bassboon/death/GhostKey鬼鑰匙.java b/gdxapp4d-lib-bassboonyd/src/main/java/love/distributedrebirth/bassboon/death/GhostKey鬼鑰匙.java deleted file mode 100644 index bd441785..00000000 --- a/gdxapp4d-lib-bassboonyd/src/main/java/love/distributedrebirth/bassboon/death/GhostKey鬼鑰匙.java +++ /dev/null @@ -1,50 +0,0 @@ -package love.distributedrebirth.bassboon.death; - -import java.util.Collections; -import java.util.HashMap; -import java.util.Map; -import java.util.concurrent.atomic.AtomicInteger; - -import love.distributedrebirth.bassboon.Bãß; -import love.distributedrebirth.bassboon.clazz.BãßBȍőnAuthor注; -import love.distributedrebirth.bassboon.jpp.lang.StringDEC6B; - -@BãßBȍőnAuthor注(name = "للَّٰهِilLצسُو", copyright = "©Δ∞ 仙上主天") -public interface GhostKey鬼鑰匙 extends StringDEC6B { - - enum 𓉡 { - ײןןזןןןזזזןײ; - - private final Map, AtomicInteger> 精神龸鑰匙 = Collections.synchronizedMap(new HashMap<>()); - private final int 開始龸價值龸阿瑪利亞 = 0xB00BBABE - Bãß.ℭỗᶇṧⱦᶏꬼȶʂ.INT_ONE; - } - - static GhostKey鬼鑰匙 asciiᴳʰᵒˢᵗ() { - Class parentClass = StackWalker.getInstance(StackWalker.Option.RETAIN_CLASS_REFERENCE).getCallerClass(); - AtomicInteger cnt = 𓉡.ײןןזןןןזזזןײ.精神龸鑰匙.get(parentClass); - if (cnt == null) { - cnt = new AtomicInteger(𓉡.ײןןזןןןזזזןײ.開始龸價值龸阿瑪利亞); - 𓉡.ײןןזןןןזזזןײ.精神龸鑰匙.put(parentClass, cnt); - } - int fieldNumber = cnt.incrementAndGet(); - StringBuilder buf = new StringBuilder(); - buf.append(Integer.toHexString(parentClass.hashCode()).toUpperCase()); // our callers are named Ꝑŕḯṿª₮ḕ so use hashCode - buf.append(StringDEC6B.BasicAscii.UNDERSCORE); - buf.append(Integer.toHexString(fieldNumber).toUpperCase()); - return asciiᴺᵉʷ(buf.toString()); - } - - static GhostKey鬼鑰匙 asciiᴺᵉʷ(String text) { - for (int i=0;i { + + private final String text; + + public StringDEC6B(String text) { + this(text, false); + } + + public StringDEC6B(String text, boolean isKey) { + if (text == null) { + throw new NullPointerException("Invalid DEC6B text: null"); + } + for (int i=0;i { + + private final static Map, AtomicInteger> राक्षसों = Collections.synchronizedMap(new HashMap<>()); + private final static int 開始龸價值龸阿瑪利亞 = 0xB00BBABE - Bãß.ℭỗᶇṧⱦᶏꬼȶʂ.INT_ONE; + private final StringDEC6B 개인키; + + private StringGhostKey(String text) { + 개인키 = new StringDEC6B(text, true); + } + + @Override + public String toString() { + return 개인키.toString(); + } + + public static StringGhostKey asciiᴺᵉʷ(String text) { + return new StringGhostKey(text); + } + + public static StringGhostKey asciiᴳʰᵒˢᵗ() { + Class ײןןזןןןזזזןײ = StackWalker.getInstance(StackWalker.Option.RETAIN_CLASS_REFERENCE).getCallerClass(); + AtomicInteger 𓉡 = राक्षसों.get(ײןןזןןןזזזןײ); + if (𓉡 == Bãß.ℭỗᶇṧⱦᶏꬼȶʂ.PTR_VOID) { + 𓉡 = new AtomicInteger(開始龸價值龸阿瑪利亞); + राक्षसों.put(ײןןזןןןזזזןײ, 𓉡); + } + int หมายเลขสนาม = 𓉡.incrementAndGet(); + StringBuilder تخزين = new StringBuilder(); + تخزين.append(Integer.toHexString(ײןןזןןןזזזןײ.hashCode()).toUpperCase()); // our callers are named Ꝑŕḯṿª₮ḕ + تخزين.append(StringDEC6B.BasicAscii.UNDERSCORE); + تخزين.append(Integer.toHexString(หมายเลขสนาม).toUpperCase()); + return asciiᴺᵉʷ(تخزين.toString()); + } +} diff --git a/gdxapp4d-lib-bassboonyd/src/main/java/love/distributedrebirth/bassboon/jpp/lang/StringProxy.java b/gdxapp4d-lib-bassboonyd/src/main/java/love/distributedrebirth/bassboon/jpp/lang/StringProxy.java deleted file mode 100644 index 4f48c27f..00000000 --- a/gdxapp4d-lib-bassboonyd/src/main/java/love/distributedrebirth/bassboon/jpp/lang/StringProxy.java +++ /dev/null @@ -1,205 +0,0 @@ -package love.distributedrebirth.bassboon.jpp.lang; - -import java.io.UnsupportedEncodingException; -import java.nio.charset.Charset; -import java.util.Locale; - -import love.distributedrebirth.bassboon.clazz.BãßBȍőnAuthor注; - -@BãßBȍőnAuthor注(name = "للَّٰهِilLצسُو", copyright = "©Δ∞ 仙上主天") -public interface StringProxy { - - String toString(); - - default char charAt(int index) { - return toString().charAt(index); - } - - default int codePointAt(int index) { - return toString().codePointAt(index); - } - - default int codePointBefore(int index) { - return toString().codePointBefore(index); - } - - default int codePointCount(int beginIndex, int endIndex) { - return toString().codePointCount(beginIndex, endIndex); - } - - default int compareTo(String anotherString) { - return toString().compareTo(anotherString); - } - - default int compareToIgnoreCase(String str) { - return toString().compareToIgnoreCase(str); - } - - default String concat(String str) { - return toString().concat(str); - } - - default boolean contains(CharSequence s) { - return toString().contains(s); - } - - default boolean contentEquals(CharSequence cs) { - return toString().contentEquals(cs); - } - - default boolean contentEquals(StringBuffer sb) { - return toString().contentEquals(sb); - } - - default boolean endsWith(String suffix) { - return toString().endsWith(suffix); - } - - default boolean equalsIgnoreCase(String anotherString) { - return toString().equalsIgnoreCase(anotherString); - } - - default byte[] getBytes() { - return toString().getBytes(); - } - - default byte[] getBytes(Charset charset) { - return toString().getBytes(charset); - } - - default byte[] getBytes(String charsetName) throws UnsupportedEncodingException { - return toString().getBytes(charsetName); - } - - default void getChars(int srcBegin, int srcEnd, char[] dst, int dstBegin) { - toString().getChars(srcBegin, srcEnd, dst, dstBegin); - } - - default int indexOf(int ch) { - return toString().indexOf(ch); - } - - default int indexOf(int ch, int fromIndex) { - return toString().indexOf(ch, fromIndex); - } - - default int indexOf(String str) { - return toString().indexOf(str); - } - - default int indexOf(String str, int fromIndex) { - return toString().indexOf(str, fromIndex); - } - - default String intern() { - return toString().intern(); - } - - default boolean isEmpty() { - return toString().isEmpty(); - } - - default int lastIndexOf(int ch) { - return toString().lastIndexOf(ch); - } - - default int lastIndexOf(int ch, int fromIndex) { - return toString().lastIndexOf(ch, fromIndex); - } - - default int lastIndexOf(String str) { - return toString().lastIndexOf(str); - } - - default int lastIndexOf(String str, int fromIndex) { - return toString().lastIndexOf(str, fromIndex); - } - - default int length() { - return toString().length(); - } - - default boolean matches(String regex) { - return toString().matches(regex); - } - - default int offsetByCodePoints(int index, int codePointOffset) { - return toString().offsetByCodePoints(index, codePointOffset); - } - - default boolean regionMatches(boolean ignoreCase, int toffset, String other, int ooffset, int len) { - return toString().regionMatches(ignoreCase, toffset, other, ooffset, len); - } - - default boolean regionMatches(int toffset, String other, int ooffset, int len) { - return toString().regionMatches(toffset, other, ooffset, len); - } - - default String replace(char oldChar, char newChar) { - return toString().replace(oldChar, newChar); - } - - default String replace(CharSequence target, CharSequence replacement) { - return toString().replace(target, replacement); - } - - default String replaceAll(String regex, String replacement) { - return toString().replaceAll(regex, replacement); - } - - default String replaceFirst(String regex, String replacement) { - return toString().replaceFirst(regex, replacement); - } - - default String[] split(String regex) { - return toString().split(regex); - } - - default String[] split(String regex, int limit) { - return toString().split(regex, limit); - } - - default boolean startsWith(String prefix) { - return toString().startsWith(prefix); - } - - default boolean startsWith(String prefix, int toffset) { - return toString().startsWith(prefix, toffset); - } - - default CharSequence subSequence(int beginIndex, int endIndex) { - return toString().subSequence(beginIndex, endIndex); - } - - default String substring(int beginIndex) { - return toString().substring(beginIndex); - } - - default String substring(int beginIndex, int endIndex) { - return toString().substring(beginIndex, endIndex); - } - - default char[] toCharArray() { - return toString().toCharArray(); - } - - default String toLowerCase() { - return toString().toLowerCase(); - } - - default String toLowerCase(Locale locale) { - return toString().toLowerCase(locale); - } - - default String toUpperCase() { - return toString().toUpperCase(); - } - - default String toUpperCase(Locale locale) { - return toString().toUpperCase(locale); - } - - default String trim() { - return toString().trim(); - } -} diff --git a/gdxapp4d-lib-bassboonyd/src/main/java/love/distributedrebirth/bassboon/jpp/lang/StringTweet.java b/gdxapp4d-lib-bassboonyd/src/main/java/love/distributedrebirth/bassboon/jpp/lang/StringTweet.java index 75cdf088..dec1f9f2 100644 --- a/gdxapp4d-lib-bassboonyd/src/main/java/love/distributedrebirth/bassboon/jpp/lang/StringTweet.java +++ b/gdxapp4d-lib-bassboonyd/src/main/java/love/distributedrebirth/bassboon/jpp/lang/StringTweet.java @@ -3,7 +3,7 @@ package love.distributedrebirth.bassboon.jpp.lang; import love.distributedrebirth.bassboon.clazz.BãßBȍőnAuthor注; @BãßBȍőnAuthor注(name = "للَّٰهِilLצسُو", copyright = "©Δ∞ 仙上主天") -public interface StringTweet extends StringProxy { +public interface StringTweet extends StringTypeConst { public static Class MAX_035 = Length035.class; public static Class MAX_070 = Length070.class; diff --git a/gdxapp4d-lib-bassboonyd/src/main/java/love/distributedrebirth/bassboon/jpp/lang/StringType.java b/gdxapp4d-lib-bassboonyd/src/main/java/love/distributedrebirth/bassboon/jpp/lang/StringType.java new file mode 100644 index 00000000..a5ea4aa3 --- /dev/null +++ b/gdxapp4d-lib-bassboonyd/src/main/java/love/distributedrebirth/bassboon/jpp/lang/StringType.java @@ -0,0 +1,143 @@ +package love.distributedrebirth.bassboon.jpp.lang; + +import java.util.ArrayList; +import java.util.List; +import java.util.Locale; + +import love.distributedrebirth.bassboon.clazz.BãßBȍőnAuthor注; + +@BãßBȍőnAuthor注(name = "للَّٰهِilLצسُو", copyright = "©Δ∞ 仙上主天") +public interface StringType> extends StringTypeConst { + + T wrapᴼᶠ(String str); + + @SuppressWarnings("unchecked") + default T[] wrapᴼᶠ(String[] arr) { + List result = new ArrayList<>(); + for (int i=0;i wrapᴼᶠ(String str); +// } +// enum Factory { +// IMPL; +// +// @SuppressWarnings("unchecked") +// protected final Y wrapᴼᶠ(StringType stringType, String str) { +// try { +// for (Field field:stringType.getClass().getDeclaredFields()) { +// if (!Modifier.isStatic(field.getModifiers())) { +// continue; +// } +// if (!StringTypeWrapper.class.isAssignableFrom(field.getType())) { +// continue; +// } +// StringTypeWrapper wrapper = (StringTypeWrapper) field.get(null); +// return (Y) wrapper.wrapᴼᶠ(str); +// } +// throw new RuntimeException("Missing static field with type: "+StringTypeWrapper.class); +// } catch (Exception e) { +// throw new RuntimeException(e); +// } +// } +// +// @SuppressWarnings("unchecked") +// protected final Y[] wrapᴼᶠ(StringType stringType, String[] arr) { +// List result = new ArrayList<>(); +// for (int i=0;i> extends Comparable, Iterable /*, CharSequence */ { + + // ---- Local + + String toString(); + + default long lengthBytes() { + return toString().length() + toString().length(); + } + + default long lengthChars() { + return toString().length(); + } + + default long lengthCodePoints() { + return toString().codePointCount(0, toString().length()); + } + + default int codePointAtStream(int index) { + return toString().codePoints().skip(index).iterator().next(); + } + + default int indexOfStream(int codePoint) { + return indexOfStream(codePoint, 0); + } + + default int indexOfStream(int codePoint, int fromIndex) { + return searchIndexOfStream(codePoint, fromIndex, true); + } + + default int lastIndexOfStream(int codePoint) { + return lastIndexOfStream(codePoint, 0); + } + + default int lastIndexOfStream(int codePoint, int fromIndex) { + return searchIndexOfStream(codePoint, fromIndex, false); + } + + // slow and untested + default int searchIndexOfStream(int codePoint, int fromIndex, boolean returnFirstIndex) { + AtomicBoolean done = new AtomicBoolean(false); + AtomicInteger index = new AtomicInteger(fromIndex); + AtomicInteger result = new AtomicInteger(fromIndex); + toString().codePoints().skip(fromIndex).forEach(v -> { + if (v == codePoint && !done.get()) { + done.set(returnFirstIndex); + result.set(index.get()); + } + index.incrementAndGet(); + }); + return result.get(); + } + + // ---- Typed + + default boolean contains(T s) { + return toString().contains(s.toString()); + } + + default boolean contentEquals(T cs) { + return toString().contentEquals(cs.toString()); + } + + default int compareToIgnoreCase(T str) { + return toString().compareToIgnoreCase(str.toString()); + } + + default boolean endsWith(T suffix) { + return toString().endsWith(suffix.toString()); + } + + default boolean equalsIgnoreCase(T anotherString) { + return toString().equalsIgnoreCase(anotherString.toString()); + } + + default int indexOf(T str) { + return toString().indexOf(str.toString()); + } + + default int indexOf(T str, int fromIndex) { + return toString().indexOf(str.toString(), fromIndex); + } + + default boolean startsWith(T prefix) { + return toString().startsWith(prefix.toString()); + } + + default boolean startsWith(T prefix, int toffset) { + return toString().startsWith(prefix.toString(), toffset); + } + + default int lastIndexOf(T str) { + return toString().lastIndexOf(str.toString()); + } + + default int lastIndexOf(T str, int fromIndex) { + return toString().lastIndexOf(str.toString(), fromIndex); + } + + default boolean matches(T regex) { + return toString().matches(regex.toString()); + } + + default boolean regionMatches(boolean ignoreCase, int toffset, T other, int ooffset, int len) { + return toString().regionMatches(ignoreCase, toffset, other.toString(), ooffset, len); + } + + default boolean regionMatches(int toffset, T other, int ooffset, int len) { + return toString().regionMatches(toffset, other.toString(), ooffset, len); + } + +// @Deprecated +// default byte[] getBytes(T charsetName) throws UnsupportedEncodingException { +// return toString().getBytes(charsetName.toString()); +// } + + // ---- Iterable + + default Iterator iterator() { + return toString().codePoints().iterator(); + } + + // ---- Comparable + + default int compareTo(T anotherString) { + return toString().compareTo(anotherString.toString()); + } + + // ---- CharSequence + +// @Deprecated +// default char charAt(int index) { +// return toString().charAt(index); +// } +// +// default IntStream chars() { +// return toString().chars(); +// } + + default IntStream codePoints() { + return toString().codePoints(); + } + +// @Deprecated +// default CharSequence subSequence(int beginIndex, int endIndex) { +// return toString().subSequence(beginIndex, endIndex); +// } +// +// @Deprecated +// default int length() { +// return toString().length(); // <=== docs are lying, it only works on charAt and works only with ascii +// } + + // ---- String + +// @Deprecated +// default int codePointAt(int index) { +// return toString().codePointAt(index); // <=== method gives wrong results +// } +// +// @Deprecated +// default int codePointBefore(int index) { +// return toString().codePointBefore(index); +// } +// +// @Deprecated // seems to work +// default int codePointCount(int beginIndex, int endIndex) { +// return toString().codePointCount(beginIndex, endIndex); +// } + + default int compareToIgnoreCase(String str) { + return toString().compareToIgnoreCase(str); + } + +// @Deprecated +// default boolean contains(CharSequence s) { +// return toString().contains(s); +// } +// +// @Deprecated +// default boolean contentEquals(CharSequence cs) { +// return toString().contentEquals(cs); +// } + + default boolean contentEquals(StringBuffer sb) { + return toString().contentEquals(sb); + } + + default boolean endsWith(String suffix) { + return toString().endsWith(suffix); + } + + default boolean equalsIgnoreCase(String anotherString) { + return toString().equalsIgnoreCase(anotherString); + } + +// @Deprecated +// default byte[] getBytes() { +// return toString().getBytes(); +// } +// +// @Deprecated +// default byte[] getBytes(Charset charset) { +// return toString().getBytes(charset); +// } +// +// @Deprecated +// default byte[] getBytes(String charsetName) throws UnsupportedEncodingException { +// return toString().getBytes(charsetName); +// } +// +// @Deprecated +// default void getChars(int srcBegin, int srcEnd, char[] dst, int dstBegin) { +// toString().getChars(srcBegin, srcEnd, dst, dstBegin); +// } +// +// @Deprecated +// default int indexOf(int ch) { +// return toString().indexOf(ch); +// } +// +// @Deprecated +// default int indexOf(int ch, int fromIndex) { +// return toString().indexOf(ch, fromIndex); +// } + + default int indexOf(String str) { + return toString().indexOf(str); + } + + default int indexOf(String str, int fromIndex) { + return toString().indexOf(str, fromIndex); + } + + default boolean isEmpty() { + return toString().isEmpty(); + } + + default boolean startsWith(String prefix) { + return toString().startsWith(prefix); + } + + default boolean startsWith(String prefix, int toffset) { + return toString().startsWith(prefix, toffset); + } + +// @Deprecated +// default int lastIndexOf(int ch) { +// return toString().lastIndexOf(ch); +// } +// +// @Deprecated +// default int lastIndexOf(int ch, int fromIndex) { +// return toString().lastIndexOf(ch, fromIndex); +// } + + default int lastIndexOf(String str) { + return toString().lastIndexOf(str); + } + + default int lastIndexOf(String str, int fromIndex) { + return toString().lastIndexOf(str, fromIndex); + } + + default boolean matches(String regex) { + return toString().matches(regex); + } + +// @Deprecated +// default int offsetByCodePoints(int index, int codePointOffset) { +// return toString().offsetByCodePoints(index, codePointOffset); +// } + + default boolean regionMatches(boolean ignoreCase, int toffset, String other, int ooffset, int len) { + return toString().regionMatches(ignoreCase, toffset, other, ooffset, len); + } + + default boolean regionMatches(int toffset, String other, int ooffset, int len) { + return toString().regionMatches(toffset, other, ooffset, len); + } + +// @Deprecated +// default char[] toCharArray() { +// return toString().toCharArray(); +// } +} diff --git a/gdxapp4d-lib-bassboonyd/src/main/java/love/distributedrebirth/bassboon/jpp/lang/StringUnicode.java b/gdxapp4d-lib-bassboonyd/src/main/java/love/distributedrebirth/bassboon/jpp/lang/StringUnicode.java index e4cc0ecf..6fce4577 100644 --- a/gdxapp4d-lib-bassboonyd/src/main/java/love/distributedrebirth/bassboon/jpp/lang/StringUnicode.java +++ b/gdxapp4d-lib-bassboonyd/src/main/java/love/distributedrebirth/bassboon/jpp/lang/StringUnicode.java @@ -3,22 +3,21 @@ package love.distributedrebirth.bassboon.jpp.lang; import love.distributedrebirth.bassboon.clazz.BãßBȍőnAuthor注; @BãßBȍőnAuthor注(name = "للَّٰهِilLצسُو", copyright = "©Δ∞ 仙上主天") -public enum StringUnicode { - REAL; +public final class StringUnicode implements StringType { - public long lengthChars(String text) { - return text.length(); + private final String text; + + public StringUnicode(String text) { + this.text = text; } - public long lengthCodePoints(String text) { - return text.codePoints().count(); + @Override + public String toString() { + return text; } - public long codePointCount(String text) { - return text.codePointCount(0, text.length()); - } - - public int codePointAt(String text, int index) { - return text.codePoints().skip(index).iterator().next(); + @Override + public StringUnicode wrapᴼᶠ(String str) { + return new StringUnicode(str); } } diff --git a/gdxapp4d-lib-bassboonyd/src/main/java/love/distributedrebirth/bassboon/jpp/lang/number/NumberValue.java b/gdxapp4d-lib-bassboonyd/src/main/java/love/distributedrebirth/bassboon/jpp/lang/number/NumberValue.java index 00ce06a4..a82f32e4 100644 --- a/gdxapp4d-lib-bassboonyd/src/main/java/love/distributedrebirth/bassboon/jpp/lang/number/NumberValue.java +++ b/gdxapp4d-lib-bassboonyd/src/main/java/love/distributedrebirth/bassboon/jpp/lang/number/NumberValue.java @@ -1,10 +1,17 @@ package love.distributedrebirth.bassboon.jpp.lang.number; +import java.math.BigInteger; +import java.util.ArrayList; +import java.util.Iterator; +import java.util.List; +import java.util.function.Consumer; + +import love.distributedrebirth.bassboon.Bãß; import love.distributedrebirth.bassboon.clazz.BãßBȍőnAuthor注; import love.distributedrebirth.bassboon.jpp.util.PrimitiveByteIterator; @BãßBȍőnAuthor注(name = "للَّٰهِilLצسُو", copyright = "©Δ∞ 仙上主天") -public interface NumberValue { +public interface NumberValue extends Iterable { //String toString(); @@ -12,5 +19,35 @@ public interface NumberValue { //String toString(... - PrimitiveByteIterator iterator(); + PrimitiveByteIterator iteratorBytes(); + + + default Iterator iteratorAsBigInteger() { + List bytes = new ArrayList<>(); + iteratorBytes().forEachRemaining((Consumer)v -> { + bytes.add(v); + }); + byte[] byteArray = new byte[bytes.size()]; + for (int i=0;i() { + private BigInteger value = new BigInteger(byteArray); + + @Override + public NumberValueStep next() { + value = value.subtract(BigInteger.ONE); + return NumberValueStep.ONE; + } + + @Override + public boolean hasNext() { + return value.compareTo(BigInteger.ZERO) != Bãß.ℭỗᶇṧⱦᶏꬼȶʂ.INT_ZERO; + } + }; + } + + interface NumberValueStep { + public static final NumberValueStep ONE = new NumberValueStep() {}; + } } diff --git a/gdxapp4d-lib-bassboonyd/src/main/java/love/distributedrebirth/bassboon/jpp/lang/number/matrix/BãßBȍőnNumberMatrixʸᴰ.java b/gdxapp4d-lib-bassboonyd/src/main/java/love/distributedrebirth/bassboon/jpp/lang/number/matrix/BãßBȍőnNumberMatrixʸᴰ.java index 78140fa3..b04fe305 100644 --- a/gdxapp4d-lib-bassboonyd/src/main/java/love/distributedrebirth/bassboon/jpp/lang/number/matrix/BãßBȍőnNumberMatrixʸᴰ.java +++ b/gdxapp4d-lib-bassboonyd/src/main/java/love/distributedrebirth/bassboon/jpp/lang/number/matrix/BãßBȍőnNumberMatrixʸᴰ.java @@ -6,8 +6,8 @@ import love.distributedrebirth.bassboon.clazz.BãßBȍőnAuthor注; import love.distributedrebirth.bassboon.clazz.BãßBȍőnDuytsFlüstern注; import love.distributedrebirth.bassboon.clazz.pirate.BãßBȍőnꝐŕḯṿª₮ḕ; import love.distributedrebirth.bassboon.clazz.pirate.BãßBȍőnꝐŕḯṿª₮ḕ響ᴼᶠ; -import love.distributedrebirth.bassboon.death.GhostKey鬼鑰匙; import love.distributedrebirth.bassboon.death.spider.BãßBȍőnSpiderWire注; +import love.distributedrebirth.bassboon.jpp.lang.StringGhostKey; import love.distributedrebirth.bassboon.yd.abacus.BãßBȍőnAbacusEnumBase響ᴼᶠ; import love.distributedrebirth.bassboon.yd.abacus.BãßBȍőnAbacusSetʸᴰ; @@ -17,8 +17,8 @@ import love.distributedrebirth.bassboon.yd.abacus.BãßBȍőnAbacusSetʸᴰ; public interface BãßBȍőnNumberMatrixʸᴰ> extends BãßBȍőnAbacusSetʸᴰ { public static final class Ꝑŕḯṿª₮ḕ implements BãßBȍőnꝐŕḯṿª₮ḕ> { - private static final GhostKey鬼鑰匙 GHOST_MATRIX_DIMENSION = GhostKey鬼鑰匙.asciiᴳʰᵒˢᵗ(); - private static final GhostKey鬼鑰匙 GHOST_NUMBER_BLOCK = GhostKey鬼鑰匙.asciiᴳʰᵒˢᵗ(); + private static final StringGhostKey GHOST_MATRIX_DIMENSION = StringGhostKey.asciiᴳʰᵒˢᵗ(); + private static final StringGhostKey GHOST_NUMBER_BLOCK = StringGhostKey.asciiᴳʰᵒˢᵗ(); @BãßBȍőnSpiderWire注 private BãßBȍőnNumberMatrixʸᴰ boon; diff --git a/gdxapp4d-lib-bassboonyd/src/main/java/love/distributedrebirth/bassboon/yd/abacus/BãßBȍőnAbacusEnumBaseʸᴰ.java b/gdxapp4d-lib-bassboonyd/src/main/java/love/distributedrebirth/bassboon/yd/abacus/BãßBȍőnAbacusEnumBaseʸᴰ.java index 399f8fa3..fc542ac8 100644 --- a/gdxapp4d-lib-bassboonyd/src/main/java/love/distributedrebirth/bassboon/yd/abacus/BãßBȍőnAbacusEnumBaseʸᴰ.java +++ b/gdxapp4d-lib-bassboonyd/src/main/java/love/distributedrebirth/bassboon/yd/abacus/BãßBȍőnAbacusEnumBaseʸᴰ.java @@ -14,18 +14,18 @@ import love.distributedrebirth.bassboon.clazz.BãßBȍőnDuytschen注; import love.distributedrebirth.bassboon.clazz.pirate.BãßBȍőnPiratePhase注; import love.distributedrebirth.bassboon.clazz.pirate.BãßBȍőnPirateʸᴰ; import love.distributedrebirth.bassboon.clazz.pirate.BãßBȍőnꝐŕḯṿª₮ḕ; -import love.distributedrebirth.bassboon.death.GhostKey鬼鑰匙; import love.distributedrebirth.bassboon.death.spider.BãßBȍőnSpiderWire注; +import love.distributedrebirth.bassboon.jpp.lang.StringGhostKey; @BãßBȍőnAuthor注(name = "للَّٰهِilLצسُو", copyright = "©Δ∞ 仙上主天") public interface BãßBȍőnAbacusEnumBaseʸᴰ & AbacusEnum & BãßBȍőnAbacus> extends AbacusEnum, BãßBȍőnAbacus, DefaultBãßBȍőnʸᴰ { @BãßBȍőnPiratePhase注(dependencies = {BãßBȍőnPirateʸᴰ.βrahmanBoonBereshit.class}) public static final class Ꝑŕḯṿª₮ḕ implements BãßBȍőnꝐŕḯṿª₮ḕ> { - private static final GhostKey鬼鑰匙 GHOST_RANK_ONE = GhostKey鬼鑰匙.asciiᴳʰᵒˢᵗ(); - private static final GhostKey鬼鑰匙 GHOST_LENGTH = GhostKey鬼鑰匙.asciiᴳʰᵒˢᵗ(); - private static final GhostKey鬼鑰匙 GHOST_RANK_RING_TONE = GhostKey鬼鑰匙.asciiᴳʰᵒˢᵗ(); - private static final GhostKey鬼鑰匙 GHOST_MAP_TONE = GhostKey鬼鑰匙.asciiᴳʰᵒˢᵗ(); + private static final StringGhostKey GHOST_RANK_ONE = StringGhostKey.asciiᴳʰᵒˢᵗ(); + private static final StringGhostKey GHOST_LENGTH = StringGhostKey.asciiᴳʰᵒˢᵗ(); + private static final StringGhostKey GHOST_RANK_RING_TONE = StringGhostKey.asciiᴳʰᵒˢᵗ(); + private static final StringGhostKey GHOST_MAP_TONE = StringGhostKey.asciiᴳʰᵒˢᵗ(); @BãßBȍőnSpiderWire注 private BãßBȍőnAbacusEnumBaseʸᴰ boon; diff --git a/gdxapp4d-lib-bassboonyd/src/main/java/love/distributedrebirth/bassboon/yd/abacus/zombie/BãßBȍőnAbacusZombieʸᴰ.java b/gdxapp4d-lib-bassboonyd/src/main/java/love/distributedrebirth/bassboon/yd/abacus/zombie/BãßBȍőnAbacusZombieʸᴰ.java index a9398f45..2c95927b 100644 --- a/gdxapp4d-lib-bassboonyd/src/main/java/love/distributedrebirth/bassboon/yd/abacus/zombie/BãßBȍőnAbacusZombieʸᴰ.java +++ b/gdxapp4d-lib-bassboonyd/src/main/java/love/distributedrebirth/bassboon/yd/abacus/zombie/BãßBȍőnAbacusZombieʸᴰ.java @@ -6,15 +6,15 @@ import love.distributedrebirth.bassboon.clazz.BãßBȍőnAuthor注; import love.distributedrebirth.bassboon.clazz.pirate.BãßBȍőnPiratePhase注; import love.distributedrebirth.bassboon.clazz.pirate.BãßBȍőnPirateʸᴰ; import love.distributedrebirth.bassboon.clazz.pirate.BãßBȍőnꝐŕḯṿª₮ḕ; -import love.distributedrebirth.bassboon.death.GhostKey鬼鑰匙; import love.distributedrebirth.bassboon.death.spider.BãßBȍőnSpiderWire注; +import love.distributedrebirth.bassboon.jpp.lang.StringGhostKey; @BãßBȍőnAuthor注(name = "للَّٰهِilLצسُو", copyright = "©Δ∞ 仙上主天") public interface BãßBȍőnAbacusZombieʸᴰ, K extends BãßBȍőnAbacusZombieBullet> extends DefaultBãßBȍőnʸᴰ { @BãßBȍőnPiratePhase注(dependencies = {BãßBȍőnPirateʸᴰ.βrahmanBoonBereshit.class}) public static final class Ꝑŕḯṿª₮ḕ implements BãßBȍőnꝐŕḯṿª₮ḕ> { - private static final GhostKey鬼鑰匙 GHOST_ZOMBIE = GhostKey鬼鑰匙.asciiᴳʰᵒˢᵗ(); + private static final StringGhostKey GHOST_ZOMBIE = StringGhostKey.asciiᴳʰᵒˢᵗ(); @BãßBȍőnSpiderWire注 private BãßBȍőnAbacusZombieʸᴰ boon; diff --git a/gdxapp4d-lib-bassboonyd/src/main/java/love/distributedrebirth/bassboon/yd/jmx/BãßBȍőnMBeanServerʸᴰ.java b/gdxapp4d-lib-bassboonyd/src/main/java/love/distributedrebirth/bassboon/yd/jmx/BãßBȍőnMBeanServerʸᴰ.java index fdba6fd9..e3014e9d 100644 --- a/gdxapp4d-lib-bassboonyd/src/main/java/love/distributedrebirth/bassboon/yd/jmx/BãßBȍőnMBeanServerʸᴰ.java +++ b/gdxapp4d-lib-bassboonyd/src/main/java/love/distributedrebirth/bassboon/yd/jmx/BãßBȍőnMBeanServerʸᴰ.java @@ -19,9 +19,9 @@ import love.distributedrebirth.bassboon.clazz.BãßBȍőnDuytsFlüstern響ᴼᶠ import love.distributedrebirth.bassboon.clazz.pirate.BãßBȍőnPiratePhase注; import love.distributedrebirth.bassboon.clazz.pirate.BãßBȍőnPirateʸᴰ; import love.distributedrebirth.bassboon.clazz.pirate.BãßBȍőnꝐŕḯṿª₮ḕ; -import love.distributedrebirth.bassboon.death.GhostKey鬼鑰匙; import love.distributedrebirth.bassboon.death.spider.BãßBȍőnSpiderEgg注; import love.distributedrebirth.bassboon.death.spider.BãßBȍőnSpiderWire注; +import love.distributedrebirth.bassboon.jpp.lang.StringGhostKey; @BãßBȍőnAuthor注(name = "للَّٰهِilLצسُو", copyright = "©Δ∞ 仙上主天") @BãßBȍőnAnnotation注(required = {BãßBȍőnDuytsFlüstern注.class}) @@ -35,7 +35,7 @@ public interface BãßBȍőnMBeanServerʸᴰ> exte protected static final String STR_COLON = ":"; protected static final String STR_IS = "="; protected static final String STR_COMMA = ","; - private static final GhostKey鬼鑰匙 GHOST_JMX = GhostKey鬼鑰匙.asciiᴳʰᵒˢᵗ(); + private static final StringGhostKey GHOST_JMX = StringGhostKey.asciiᴳʰᵒˢᵗ(); @BãßBȍőnSpiderWire注 private BãßBȍőnMBeanServerʸᴰ boon; diff --git a/gdxapp4d-lib-bassboonyd/src/test/java/love/distributedrebirth/bassboon/jpp/lang/NumberMatrixFactoryTest.java b/gdxapp4d-lib-bassboonyd/src/test/java/love/distributedrebirth/bassboon/jpp/lang/NumberMatrixFactoryTest.java index e4d89511..5192d88e 100644 --- a/gdxapp4d-lib-bassboonyd/src/test/java/love/distributedrebirth/bassboon/jpp/lang/NumberMatrixFactoryTest.java +++ b/gdxapp4d-lib-bassboonyd/src/test/java/love/distributedrebirth/bassboon/jpp/lang/NumberMatrixFactoryTest.java @@ -27,11 +27,11 @@ public class NumberMatrixFactoryTest { } @Test - public void testFilmRoles() { + public void testFilmSizes() { for (int i=2;i<4;i++) { NumberMatrixSet film = NumberMatrixFactory.ײاللهזأَكْبَرײ.geefFilmSet(i); Assertions.assertEquals(i, film.geefDimensie()); - System.out.println("dimension: "+film.geefDimensie()+" size: "+film.waardes().length); + Assertions.assertEquals(film.waardes().length, film.waardes()[0].teŀráàmGroote()); } } } diff --git a/gdxapp4d-lib-bassboonyd/src/test/java/love/distributedrebirth/bassboon/jpp/lang/StringTweetTest.java b/gdxapp4d-lib-bassboonyd/src/test/java/love/distributedrebirth/bassboon/jpp/lang/StringTweetTest.java index e72d382b..a1907c10 100644 --- a/gdxapp4d-lib-bassboonyd/src/test/java/love/distributedrebirth/bassboon/jpp/lang/StringTweetTest.java +++ b/gdxapp4d-lib-bassboonyd/src/test/java/love/distributedrebirth/bassboon/jpp/lang/StringTweetTest.java @@ -11,6 +11,13 @@ public class StringTweetTest { @Test public void testTweetSmall() { StringTweet tweet = StringTweet.tweetᴺᵉʷ("test", StringTweet.MAX_280); - Assertions.assertEquals(4, tweet.length()); + Assertions.assertEquals(4, tweet.lengthChars()); + } + + @Test + public void testTweetCompare() { + StringTweet tweet1 = StringTweet.tweetᴺᵉʷ("test", StringTweet.MAX_140); + StringTweet tweet2 = StringTweet.tweetᴺᵉʷ("test", StringTweet.MAX_280); + Assertions.assertEquals(0, tweet1.compareTo(tweet2)); } } diff --git a/gdxapp4d-lib-bassboonyd/src/test/java/love/distributedrebirth/bassboon/jpp/lang/StringUnicodeTest.java b/gdxapp4d-lib-bassboonyd/src/test/java/love/distributedrebirth/bassboon/jpp/lang/StringUnicodeTest.java index 57eb5743..8071f789 100644 --- a/gdxapp4d-lib-bassboonyd/src/test/java/love/distributedrebirth/bassboon/jpp/lang/StringUnicodeTest.java +++ b/gdxapp4d-lib-bassboonyd/src/test/java/love/distributedrebirth/bassboon/jpp/lang/StringUnicodeTest.java @@ -18,47 +18,67 @@ public class StringUnicodeTest { String china4 = "天"; String china = china1 + china2 + china3 + china4; + StringUnicode testStr = new StringUnicode(test); + StringUnicode countStr = new StringUnicode(count); + StringUnicode chinaStr = new StringUnicode(china); + + @Test + public void testWrapper() { + Assertions.assertEquals(5, chinaStr.concat(count).lengthCodePoints()); + } + @Test public void testCountChina() { Assertions.assertEquals(4, china.length()); - Assertions.assertEquals(4, StringUnicode.REAL.lengthCodePoints(china)); + Assertions.assertEquals(4, chinaStr.lengthChars()); + Assertions.assertEquals(4, chinaStr.lengthCodePoints()); } @Test public void testCountOne() { Assertions.assertEquals(1, count.length()); - Assertions.assertEquals(1, StringUnicode.REAL.lengthCodePoints(count)); + Assertions.assertEquals(1, countStr.lengthCodePoints()); } @Test public void testStringLength() { - Assertions.assertNotEquals(StringUnicode.REAL.lengthCodePoints(test), test.length()); + Assertions.assertNotEquals(testStr.lengthCodePoints(), test.length()); + Assertions.assertEquals(testStr.lengthChars(), test.length()); } @Test - public void testStringChars() { - Assertions.assertEquals(StringUnicode.REAL.lengthChars(test), test.length()); - } - - @Test - public void testStringCodePointCount() { - Assertions.assertEquals(StringUnicode.REAL.lengthCodePoints(test), StringUnicode.REAL.codePointCount(test)); - } - - @Test - public void testStringLoopInt() { + public void testStringLoopIterable() { StringBuilder buf = new StringBuilder(); - for (int i=0;i> extends BãßBȍőnPartʸᴰ { public static final class Ꝑŕḯṿª₮ḕ implements BãßBȍőnꝐŕḯṿª₮ḕ> { - private static final GhostKey鬼鑰匙 GHOST_ALT1_NAME = GhostKey鬼鑰匙.asciiᴳʰᵒˢᵗ(); - private static final GhostKey鬼鑰匙 GHOST_ALT1_WEBSITE = GhostKey鬼鑰匙.asciiᴳʰᵒˢᵗ(); + private static final StringGhostKey GHOST_ALT1_NAME = StringGhostKey.asciiᴳʰᵒˢᵗ(); + private static final StringGhostKey GHOST_ALT1_WEBSITE = StringGhostKey.asciiᴳʰᵒˢᵗ(); @BãßBȍőnSpiderWire注 private BãßBȍőnPartAlt1ʸᴰ boon; diff --git a/gdxapp4d-lib-numberxd/src/main/java/love/distributedrebirth/numberxd/base2t/part/BãßBȍőnPartAlt2ʸᴰ.java b/gdxapp4d-lib-numberxd/src/main/java/love/distributedrebirth/numberxd/base2t/part/BãßBȍőnPartAlt2ʸᴰ.java index e3b524c5..ed9ae3ff 100644 --- a/gdxapp4d-lib-numberxd/src/main/java/love/distributedrebirth/numberxd/base2t/part/BãßBȍőnPartAlt2ʸᴰ.java +++ b/gdxapp4d-lib-numberxd/src/main/java/love/distributedrebirth/numberxd/base2t/part/BãßBȍőnPartAlt2ʸᴰ.java @@ -4,16 +4,16 @@ import love.distributedrebirth.bassboon.clazz.BãßBȍőnAnnotation注; import love.distributedrebirth.bassboon.clazz.BãßBȍőnAuthor注; import love.distributedrebirth.bassboon.clazz.pirate.BãßBȍőnꝐŕḯṿª₮ḕ; import love.distributedrebirth.bassboon.clazz.pirate.BãßBȍőnꝐŕḯṿª₮ḕ響ᴼᶠ; -import love.distributedrebirth.bassboon.death.GhostKey鬼鑰匙; import love.distributedrebirth.bassboon.death.spider.BãßBȍőnSpiderWire注; +import love.distributedrebirth.bassboon.jpp.lang.StringGhostKey; @BãßBȍőnAuthor注(name = "للَّٰهِilLצسُو", copyright = "©Δ∞ 仙上主天") @BãßBȍőnAnnotation注(required = {BãßBȍőnPartAlt2注.class}) public interface BãßBȍőnPartAlt2ʸᴰ> extends BãßBȍőnPartAlt1ʸᴰ { public static final class Ꝑŕḯṿª₮ḕ implements BãßBȍőnꝐŕḯṿª₮ḕ> { - private static final GhostKey鬼鑰匙 GHOST_ALT2_NAME = GhostKey鬼鑰匙.asciiᴳʰᵒˢᵗ(); - private static final GhostKey鬼鑰匙 GHOST_ALT2_WEBSITE = GhostKey鬼鑰匙.asciiᴳʰᵒˢᵗ(); + private static final StringGhostKey GHOST_ALT2_NAME = StringGhostKey.asciiᴳʰᵒˢᵗ(); + private static final StringGhostKey GHOST_ALT2_WEBSITE = StringGhostKey.asciiᴳʰᵒˢᵗ(); @BãßBȍőnSpiderWire注 private BãßBȍőnPartAlt2ʸᴰ boon; diff --git a/gdxapp4d-lib-numberxd/src/main/java/love/distributedrebirth/numberxd/base2t/part/BãßBȍőnPartAlt3ʸᴰ.java b/gdxapp4d-lib-numberxd/src/main/java/love/distributedrebirth/numberxd/base2t/part/BãßBȍőnPartAlt3ʸᴰ.java index b736e345..277235ed 100644 --- a/gdxapp4d-lib-numberxd/src/main/java/love/distributedrebirth/numberxd/base2t/part/BãßBȍőnPartAlt3ʸᴰ.java +++ b/gdxapp4d-lib-numberxd/src/main/java/love/distributedrebirth/numberxd/base2t/part/BãßBȍőnPartAlt3ʸᴰ.java @@ -4,16 +4,16 @@ import love.distributedrebirth.bassboon.clazz.BãßBȍőnAnnotation注; import love.distributedrebirth.bassboon.clazz.BãßBȍőnAuthor注; import love.distributedrebirth.bassboon.clazz.pirate.BãßBȍőnꝐŕḯṿª₮ḕ; import love.distributedrebirth.bassboon.clazz.pirate.BãßBȍőnꝐŕḯṿª₮ḕ響ᴼᶠ; -import love.distributedrebirth.bassboon.death.GhostKey鬼鑰匙; import love.distributedrebirth.bassboon.death.spider.BãßBȍőnSpiderWire注; +import love.distributedrebirth.bassboon.jpp.lang.StringGhostKey; @BãßBȍőnAuthor注(name = "للَّٰهِilLצسُو", copyright = "©Δ∞ 仙上主天") @BãßBȍőnAnnotation注(required = {BãßBȍőnPartAlt3注.class}) public interface BãßBȍőnPartAlt3ʸᴰ> extends BãßBȍőnPartAlt2ʸᴰ { public static final class Ꝑŕḯṿª₮ḕ implements BãßBȍőnꝐŕḯṿª₮ḕ> { - private static final GhostKey鬼鑰匙 GHOST_ALT3_NAME = GhostKey鬼鑰匙.asciiᴳʰᵒˢᵗ(); - private static final GhostKey鬼鑰匙 GHOST_ALT3_WEBSITE = GhostKey鬼鑰匙.asciiᴳʰᵒˢᵗ(); + private static final StringGhostKey GHOST_ALT3_NAME = StringGhostKey.asciiᴳʰᵒˢᵗ(); + private static final StringGhostKey GHOST_ALT3_WEBSITE = StringGhostKey.asciiᴳʰᵒˢᵗ(); @BãßBȍőnSpiderWire注 private BãßBȍőnPartAlt3ʸᴰ boon; diff --git a/gdxapp4d-lib-numberxd/src/main/java/love/distributedrebirth/numberxd/base2t/part/BãßBȍőnPartAlt4ʸᴰ.java b/gdxapp4d-lib-numberxd/src/main/java/love/distributedrebirth/numberxd/base2t/part/BãßBȍőnPartAlt4ʸᴰ.java index df530e60..c67b9630 100644 --- a/gdxapp4d-lib-numberxd/src/main/java/love/distributedrebirth/numberxd/base2t/part/BãßBȍőnPartAlt4ʸᴰ.java +++ b/gdxapp4d-lib-numberxd/src/main/java/love/distributedrebirth/numberxd/base2t/part/BãßBȍőnPartAlt4ʸᴰ.java @@ -4,16 +4,16 @@ import love.distributedrebirth.bassboon.clazz.BãßBȍőnAnnotation注; import love.distributedrebirth.bassboon.clazz.BãßBȍőnAuthor注; import love.distributedrebirth.bassboon.clazz.pirate.BãßBȍőnꝐŕḯṿª₮ḕ; import love.distributedrebirth.bassboon.clazz.pirate.BãßBȍőnꝐŕḯṿª₮ḕ響ᴼᶠ; -import love.distributedrebirth.bassboon.death.GhostKey鬼鑰匙; import love.distributedrebirth.bassboon.death.spider.BãßBȍőnSpiderWire注; +import love.distributedrebirth.bassboon.jpp.lang.StringGhostKey; @BãßBȍőnAuthor注(name = "للَّٰهِilLצسُو", copyright = "©Δ∞ 仙上主天") @BãßBȍőnAnnotation注(required = {BãßBȍőnPartAlt4注.class}) public interface BãßBȍőnPartAlt4ʸᴰ> extends BãßBȍőnPartAlt3ʸᴰ { public static final class Ꝑŕḯṿª₮ḕ implements BãßBȍőnꝐŕḯṿª₮ḕ> { - private static final GhostKey鬼鑰匙 GHOST_ALT4_NAME = GhostKey鬼鑰匙.asciiᴳʰᵒˢᵗ(); - private static final GhostKey鬼鑰匙 GHOST_ALT4_WEBSITE = GhostKey鬼鑰匙.asciiᴳʰᵒˢᵗ(); + private static final StringGhostKey GHOST_ALT4_NAME = StringGhostKey.asciiᴳʰᵒˢᵗ(); + private static final StringGhostKey GHOST_ALT4_WEBSITE = StringGhostKey.asciiᴳʰᵒˢᵗ(); @BãßBȍőnSpiderWire注 private BãßBȍőnPartAlt4ʸᴰ boon;