diff --git a/core/src/main/java/cc/carm/lib/configuration/source/section/ConfigureSection.java b/core/src/main/java/cc/carm/lib/configuration/source/section/ConfigureSection.java index e77199b..be89b21 100644 --- a/core/src/main/java/cc/carm/lib/configuration/source/section/ConfigureSection.java +++ b/core/src/main/java/cc/carm/lib/configuration/source/section/ConfigureSection.java @@ -155,7 +155,7 @@ public interface ConfigureSection { void remove(@NotNull String path); /** - * Check if the value of given path is present. + * Check if the given path is present. *
* Path separator depends on holder's * {@link cc.carm.lib.configuration.source.option.StandardOptions#PATH_SEPARATOR} @@ -164,6 +164,19 @@ public interface ConfigureSection { * @return True if the value is present, false otherwise. */ default boolean contains(@NotNull String path) { + return getKeys(true).contains(path); + } + + /** + * Check if the value of given path is present. + *
+ * Path separator depends on holder's
+ * {@link cc.carm.lib.configuration.source.option.StandardOptions#PATH_SEPARATOR}
+ *
+ * @param path The path to check.
+ * @return True if the value is present, false otherwise.
+ */
+ default boolean containsValue(@NotNull String path) {
return get(path) != null;
}
diff --git a/features/section/src/main/java/cc/carm/lib/configuration/source/section/MapSection.java b/features/section/src/main/java/cc/carm/lib/configuration/source/section/MapSection.java
index d73e4c6..6d8eab6 100644
--- a/features/section/src/main/java/cc/carm/lib/configuration/source/section/MapSection.java
+++ b/features/section/src/main/java/cc/carm/lib/configuration/source/section/MapSection.java
@@ -45,6 +45,16 @@ public abstract class MapSection