Added Duytschen
This commit is contained in:
parent
51864e2262
commit
0ecc63e44c
59 changed files with 624 additions and 295 deletions
|
|
@ -8,84 +8,84 @@ import love.distributedrebirth.bassboon.clazz.BãßBȍőnAuthor注;
|
|||
@BãßBȍőnAuthor注(name = "للَّٰهِilLצسُو", copyright = "©Δ∞ 仙上主天")
|
||||
public interface BãßBȍőnCoffinGhost {
|
||||
|
||||
Object GHOST_OBJ(String key);
|
||||
Object GHOST_OBJ(GhostKey鬼鑰匙 key);
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
default <Y> Y GHOST_OBJ(String key, Class<Y> type) {
|
||||
default <Y> Y GHOST_OBJ(GhostKey鬼鑰匙 key, Class<Y> type) {
|
||||
return (Y) GHOST_OBJ(key);
|
||||
}
|
||||
|
||||
default String GHOST_STR(String key) {
|
||||
default String GHOST_STR(GhostKey鬼鑰匙 key) {
|
||||
return String.class.cast(GHOST_OBJ(key));
|
||||
}
|
||||
|
||||
default Short GHOST_SHORT(String key) {
|
||||
default Short GHOST_SHORT(GhostKey鬼鑰匙 key) {
|
||||
return Short.class.cast(GHOST_OBJ(key));
|
||||
}
|
||||
|
||||
default Character GHOST_CHAR(String key) {
|
||||
default Character GHOST_CHAR(GhostKey鬼鑰匙 key) {
|
||||
return Character.class.cast(GHOST_OBJ(key));
|
||||
}
|
||||
|
||||
default Integer GHOST_INT(String key) {
|
||||
default Integer GHOST_INT(GhostKey鬼鑰匙 key) {
|
||||
return Integer.class.cast(GHOST_OBJ(key));
|
||||
}
|
||||
|
||||
default Long GHOST_LONG(String key) {
|
||||
default Long GHOST_LONG(GhostKey鬼鑰匙 key) {
|
||||
return Long.class.cast(GHOST_OBJ(key));
|
||||
}
|
||||
|
||||
default Boolean GHOST_BOOL(String key) {
|
||||
default Boolean GHOST_BOOL(GhostKey鬼鑰匙 key) {
|
||||
return Boolean.class.cast(GHOST_OBJ(key));
|
||||
}
|
||||
|
||||
default Float GHOST_FLOAT(String key) {
|
||||
default Float GHOST_FLOAT(GhostKey鬼鑰匙 key) {
|
||||
return Float.class.cast(GHOST_OBJ(key));
|
||||
}
|
||||
|
||||
default Double GHOST_DOUBLE(String key) {
|
||||
default Double GHOST_DOUBLE(GhostKey鬼鑰匙 key) {
|
||||
return Double.class.cast(GHOST_OBJ(key));
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
default Map<String,Object> GHOST_MAP_OBJ(String key) {
|
||||
default Map<String,Object> GHOST_MAP_OBJ(GhostKey鬼鑰匙 key) {
|
||||
return Map.class.cast(GHOST_OBJ(key));
|
||||
}
|
||||
|
||||
default Object GHOST_MAP_OBJ_VALUE(String key, String valueKey) {
|
||||
return GHOST_MAP_OBJ(key).get(valueKey);
|
||||
default Object GHOST_MAP_OBJ_VALUE(GhostKey鬼鑰匙 key, String mapKey) {
|
||||
return GHOST_MAP_OBJ(key).get(mapKey);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
default Map<String,String> GHOST_MAP_STR(String key) {
|
||||
default Map<String,String> GHOST_MAP_STR(GhostKey鬼鑰匙 key) {
|
||||
return Map.class.cast(GHOST_OBJ(key));
|
||||
}
|
||||
|
||||
default String GHOST_MAP_STR_VALUE(String key, String valueKey) {
|
||||
return GHOST_MAP_STR(key).get(valueKey);
|
||||
default String GHOST_MAP_STR_VALUE(GhostKey鬼鑰匙 key, String mapKey) {
|
||||
return GHOST_MAP_STR(key).get(mapKey);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
default Map<String,Integer> GHOST_MAP_INT(String key) {
|
||||
default Map<String,Integer> GHOST_MAP_INT(GhostKey鬼鑰匙 key) {
|
||||
return Map.class.cast(GHOST_OBJ(key));
|
||||
}
|
||||
|
||||
default Integer GHOST_MAP_INT_VALUE(String key, String valueKey) {
|
||||
return GHOST_MAP_INT(key).get(valueKey);
|
||||
default Integer GHOST_MAP_INT_VALUE(GhostKey鬼鑰匙 key, String mapKey) {
|
||||
return GHOST_MAP_INT(key).get(mapKey);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
default List<Object> GHOST_LIST_OBJ(String key) {
|
||||
default List<Object> GHOST_LIST_OBJ(GhostKey鬼鑰匙 key) {
|
||||
return List.class.cast(GHOST_OBJ(key));
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
default List<String> GHOST_LIST_STR(String key) {
|
||||
default List<String> GHOST_LIST_STR(GhostKey鬼鑰匙 key) {
|
||||
return List.class.cast(GHOST_OBJ(key));
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
default List<Integer> GHOST_LIST_INT(String key) {
|
||||
default List<Integer> GHOST_LIST_INT(GhostKey鬼鑰匙 key) {
|
||||
return List.class.cast(GHOST_OBJ(key));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,13 +8,13 @@ import love.distributedrebirth.bassboon.clazz.BãßBȍőnAuthor注;
|
|||
@BãßBȍőnAuthor注(name = "للَّٰهِilLצسُو", copyright = "©Δ∞ 仙上主天")
|
||||
public interface BãßBȍőnCoffinGhostSpell extends BãßBȍőnCoffinGhost {
|
||||
|
||||
Object PUT_GHOST(String key, Object value);
|
||||
Object PUT_GHOST(GhostKey鬼鑰匙 key, Object value);
|
||||
|
||||
default void PUT_GHOST_MAP(String key) {
|
||||
default void PUT_GHOST_MAP(GhostKey鬼鑰匙 key) {
|
||||
PUT_GHOST(key, new HashMap<>());
|
||||
}
|
||||
|
||||
default void PUT_GHOST_LIST(String key) {
|
||||
default void PUT_GHOST_LIST(GhostKey鬼鑰匙 key) {
|
||||
PUT_GHOST(key, new ArrayList<>());
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -18,9 +18,9 @@ public interface BãßBȍőnCoffinGhostSpellLock extends BãßBȍőnCoffinGhostS
|
|||
}
|
||||
|
||||
static BãßBȍőnCoffinGhostSpellLock instanceᴺᵉʷ() {
|
||||
Function<Map<String,Object>,BãßBȍőnCoffinGhost> keyMaker = v -> {
|
||||
Map<String,Object> summonedGhosts = new HashMap<>(v);
|
||||
for (String entity:v.keySet()) {
|
||||
Function<Map<GhostKey鬼鑰匙,Object>,BãßBȍőnCoffinGhost> keyMaker = v -> {
|
||||
Map<GhostKey鬼鑰匙,Object> summonedGhosts = new HashMap<>(v);
|
||||
for (GhostKey鬼鑰匙 entity:v.keySet()) {
|
||||
Object spirit = summonedGhosts.get(entity);
|
||||
if (spirit instanceof List) {
|
||||
summonedGhosts.put(entity, Collections.unmodifiableList((List<?>) spirit));
|
||||
|
|
@ -31,13 +31,13 @@ public interface BãßBȍőnCoffinGhostSpellLock extends BãßBȍőnCoffinGhostS
|
|||
}
|
||||
return new BãßBȍőnCoffinGhost() {
|
||||
@Override
|
||||
public Object GHOST_OBJ(String key) {
|
||||
public Object GHOST_OBJ(GhostKey鬼鑰匙 key) {
|
||||
return summonedGhosts.get(key);
|
||||
}
|
||||
};
|
||||
};
|
||||
return new BãßBȍőnCoffinGhostSpellLock() {
|
||||
private final Map<String,Object> ouijaBoard = new HashMap<>();
|
||||
private final Map<GhostKey鬼鑰匙,Object> ouijaBoard = new HashMap<>();
|
||||
|
||||
@Override
|
||||
public BãßBȍőnCoffinGhost LOCK() {
|
||||
|
|
@ -45,12 +45,12 @@ public interface BãßBȍőnCoffinGhostSpellLock extends BãßBȍőnCoffinGhostS
|
|||
}
|
||||
|
||||
@Override
|
||||
public Object GHOST_OBJ(String key) {
|
||||
public Object GHOST_OBJ(GhostKey鬼鑰匙 key) {
|
||||
return ouijaBoard.get(key);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object PUT_GHOST(String key, Object value) {
|
||||
public Object PUT_GHOST(GhostKey鬼鑰匙 key, Object value) {
|
||||
return ouijaBoard.put(key, value);
|
||||
}
|
||||
};
|
||||
|
|
|
|||
|
|
@ -0,0 +1,22 @@
|
|||
package love.distributedrebirth.bassboon.death;
|
||||
|
||||
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 {
|
||||
|
||||
static GhostKey鬼鑰匙 asciiᴺᵉʷ(String text) {
|
||||
for (int i=0;i<text.length();i++) {
|
||||
if (!BasicAscii.UNICODE.isValidKey(text.charAt(i))) {
|
||||
throw new IllegalArgumentException("Invalid GhostKey鑰匙 character: "+text.charAt(i));
|
||||
}
|
||||
}
|
||||
return new GhostKey鬼鑰匙() {
|
||||
@Override
|
||||
public String toString() {
|
||||
return text;
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue