gdxapp4d/demo4d-bassboonyd/src/main/love/distributedrebirth/bassboonyd/BãßBȍőnCoffinOpen.java

35 lines
854 B
Java
Raw Normal View History

2022-02-02 16:34:46 +00:00
package love.distributedrebirth.bassboonyd;
import java.util.HashMap;
import java.util.Map;
2022-02-02 17:01:10 +00:00
@BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天")
2022-02-02 17:02:46 +00:00
public interface BãßBȍőnCoffinOpen<T extends BãßBȍőnCoffinStoreKeyʸᴰ> extends BãßBȍőnCoffin<T> {
2022-02-02 16:34:46 +00:00
Object PUT_OBJ(T key, Object value);
default void PUT_MAP(T key) {
PUT_OBJ(key, new HashMap<>());
}
default void PUT_LIST(T key) {
PUT_OBJ(key, new HashMap<>());
}
2022-02-02 17:02:46 +00:00
static <Y extends BãßBȍőnCoffinStoreKeyʸᴰ> BãßBȍőnCoffinOpen<Y> newInstance() {
2022-02-02 16:34:46 +00:00
return new BãßBȍőnCoffinOpen<Y>() {
final Map<Y,Object> initMap = new HashMap<>();
@Override
public Object GET_OBJ(Y key) {
return initMap.get(key);
}
@Override
public Object PUT_OBJ(Y key, Object value) {
return initMap.put(key, value);
}
};
}
}