Class Config.Value<T>
java.lang.Object
com.github.darksoulq.abyssallib.common.config.Config.Value<T>
- Type Parameters:
T- The type of the value.
- Enclosing class:
Config
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionget()Retrieves the value from the configuration.voidSets the value in the configuration.withComment(String... comments) Adds a comment to this specific value's path.
-
Constructor Details
-
Value
-
-
Method Details
-
get
Retrieves the value from the configuration.- Returns:
- The stored value, or the default if not present.
- Throws:
RuntimeException- If aCodec.CodecExceptionoccurs during decoding.
-
set
Sets the value in the configuration. If a codec is present, it will be used to encode the value into a YAML-compatible format.- Parameters:
value- The value to store.- Throws:
RuntimeException- If aCodec.CodecExceptionoccurs during encoding.
-
withComment
Adds a comment to this specific value's path.- Parameters:
comments- The lines of the comment.- Returns:
- This
Config.Valueinstance for chaining.
-