mirror of
https://github.com/CarmJos/EasyConfiguration.git
synced 2026-06-04 18:48:20 +08:00
refactor deserialize, add set collection dsl
This commit is contained in:
@@ -96,6 +96,7 @@ public class ConfigurationTest {
|
||||
System.out.println("> Test Kotlin value after:");
|
||||
System.out.println(KotlinConfiguration.INSTANCE.getLINKED_MAP().get());
|
||||
|
||||
System.out.println("> Test Set value -> " + KotlinConfiguration.INSTANCE.getBLACK_LIST().get());
|
||||
}
|
||||
|
||||
public static void save(ConfigurationHolder<?> provider) {
|
||||
|
||||
@@ -16,6 +16,10 @@ object KotlinConfiguration : Configuration {
|
||||
defaults("Carm Jos")
|
||||
}
|
||||
|
||||
val BLACK_LIST = setFrom(String::class) {
|
||||
defaults("404", "404", "123")
|
||||
}
|
||||
|
||||
val NICKNAME = mapFrom(String::class, ::mutableMapOf) {
|
||||
defaultMap(mapOf("Carm Jos" to "Carm"))
|
||||
parse { v -> v }
|
||||
|
||||
Reference in New Issue
Block a user