public interface UnmodifiableCommentedConfig extends UnmodifiableConfig
| Modifier and Type | Interface and Description |
|---|---|
static class |
UnmodifiableCommentedConfig.CommentNode |
static interface |
UnmodifiableCommentedConfig.Entry
An unmodifiable commented config entry.
|
| Modifier and Type | Method and Description |
|---|---|
java.util.Map<java.lang.String,java.lang.String> |
commentMap()
Returns a Map view of the config's comments.
|
boolean |
containsComment(java.util.List<java.lang.String> path)
Checks if the config contains a comment at some path.
|
default boolean |
containsComment(java.lang.String path)
Checks if the config contains a comment at some path.
|
java.util.Set<? extends UnmodifiableCommentedConfig.Entry> |
entrySet()
Returns a Set view of the config's entries.
|
static UnmodifiableCommentedConfig |
fake(UnmodifiableConfig config)
If the specified config is an instance of UnmodifiableCommentedConfig, returns it.
|
java.lang.String |
getComment(java.util.List<java.lang.String> path)
Gets a comment from the config.
|
default java.lang.String |
getComment(java.lang.String path)
Gets a comment from the config.
|
default java.util.Map<java.lang.String,UnmodifiableCommentedConfig.CommentNode> |
getComments()
Returns a Map containing a deep copy of all the comments in the config.
|
default void |
getComments(java.util.Map<java.lang.String,UnmodifiableCommentedConfig.CommentNode> destination)
Puts all the config's comments to the specified map.
|
default java.util.Optional<java.lang.String> |
getOptionalComment(java.util.List<java.lang.String> path)
Gets an optional comment from the config.
|
default java.util.Optional<java.lang.String> |
getOptionalComment(java.lang.String path)
Gets an optional comment from the config.
|
apply, apply, configFormat, contains, contains, get, get, getByte, getByte, getByteOrElse, getByteOrElse, getChar, getChar, getCharOrElse, getCharOrElse, getEnum, getEnum, getEnum, getEnum, getEnumOrElse, getEnumOrElse, getEnumOrElse, getEnumOrElse, getEnumOrElse, getEnumOrElse, getEnumOrElse, getEnumOrElse, getInt, getInt, getIntOrElse, getIntOrElse, getIntOrElse, getIntOrElse, getLong, getLong, getLongOrElse, getLongOrElse, getLongOrElse, getLongOrElse, getOptional, getOptional, getOptionalEnum, getOptionalEnum, getOptionalEnum, getOptionalEnum, getOptionalInt, getOptionalInt, getOptionalLong, getOptionalLong, getOrElse, getOrElse, getOrElse, getOrElse, getRaw, getRaw, getShort, getShort, getShortOrElse, getShortOrElse, isEmpty, isNull, isNull, size, valueMapdefault java.lang.String getComment(java.lang.String path)
path - the comment's path, each part separated by a dot. Example "a.b.c"null if there is none.java.lang.String getComment(java.util.List<java.lang.String> path)
path - the comment's path, each element of the list is a different part of the path.null if there is none.default java.util.Optional<java.lang.String> getOptionalComment(java.lang.String path)
path - the comment's path, each part separated by a dot. Example "a.b.c"Optional.empty() if
there is no such comment.default java.util.Optional<java.lang.String> getOptionalComment(java.util.List<java.lang.String> path)
path - the comment's path, each element of the list is a different part of the path.Optional.empty() if
there is no such comment.default boolean containsComment(java.lang.String path)
path - the path to check, each part separated by a dot. Example "a.b.c"true if the path is associated with a comment, false if it's not.boolean containsComment(java.util.List<java.lang.String> path)
path - the path to check, each element of the list is a different part of the path.true if the path is associated with a comment, false if it's not.java.util.Map<java.lang.String,java.lang.String> commentMap()
The comment map contains only the comments of the direct elements of the configuration, not the comments of their sub-elements.
default java.util.Map<java.lang.String,UnmodifiableCommentedConfig.CommentNode> getComments()
default void getComments(java.util.Map<java.lang.String,UnmodifiableCommentedConfig.CommentNode> destination)
destination - the map where to put the comments.java.util.Set<? extends UnmodifiableCommentedConfig.Entry> entrySet()
UnmodifiableConfigentrySet in interface UnmodifiableConfigstatic UnmodifiableCommentedConfig fake(UnmodifiableConfig config)
config - the config