feat: 增强 ConfigSection
This commit is contained in:
@@ -4,10 +4,7 @@ import lombok.Getter;
|
|||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.*;
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
@SuppressWarnings({"unused", "unchecked"})
|
@SuppressWarnings({"unused", "unchecked"})
|
||||||
@Getter
|
@Getter
|
||||||
@@ -27,6 +24,15 @@ public class ConfigSection {
|
|||||||
return map.containsKey(key);
|
return map.containsKey(key);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Set<String> getKeys() {
|
||||||
|
return map.keySet();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Nullable
|
||||||
|
public Object get(@NotNull String key) {
|
||||||
|
return map.get(key);
|
||||||
|
}
|
||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
public ConfigSection getSection(@NotNull String key) {
|
public ConfigSection getSection(@NotNull String key) {
|
||||||
Object o = map.get(key);
|
Object o = map.get(key);
|
||||||
|
Reference in New Issue
Block a user