public abstract class CommentedConfigWrapper<C extends CommentedConfig> extends ConfigWrapper<C> implements CommentedConfig
CommentedConfig.EntryUnmodifiableCommentedConfig.CommentNodeconfig| Modifier | Constructor and Description |
|---|---|
protected |
CommentedConfigWrapper(C config) |
| Modifier and Type | Method and Description |
|---|---|
void |
clearComments()
Removes all the comments from the config.
|
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.
|
CommentedConfig |
createSubConfig()
Creates a new sub config of this config, as created when a subconfig's creation is
implied by
Config.set(List, Object) or Config.add(List, Object). |
java.util.Set<? extends CommentedConfig.Entry> |
entrySet()
Returns a Set view of the config's entries.
|
java.lang.String |
getComment(java.util.List<java.lang.String> path)
Gets a comment from the config.
|
java.util.Map<java.lang.String,UnmodifiableCommentedConfig.CommentNode> |
getComments()
Returns a Map containing a deep copy of all the comments in the config.
|
void |
putAllComments(java.util.Map<java.lang.String,UnmodifiableCommentedConfig.CommentNode> comments)
Puts the comments in the given map to this config.
|
void |
putAllComments(UnmodifiableCommentedConfig commentedConfig)
Puts the comments in the given config to this config.
|
java.lang.String |
removeComment(java.util.List<java.lang.String> path)
Removes a comment from the config.
|
java.lang.String |
setComment(java.util.List<java.lang.String> path,
java.lang.String comment)
Sets a config comment.
|
java.lang.String |
toString() |
add, clear, remove, setconfigFormat, contains, equals, getRaw, hashCode, isEmpty, size, valueMapclone, finalize, getClass, notify, notifyAll, wait, wait, waitchecked, concurrentCopy, concurrentCopy, concurrentCopy, concurrentCopy, copy, copy, copy, copy, copy, copy, copy, copy, fake, inMemory, inMemoryConcurrent, of, of, ofConcurrent, removeComment, setComment, unmodifiable, wrapcontainsComment, fake, getComment, getComments, getOptionalComment, getOptionalCommentadd, add, addAll, clear, getDefaultMapCreator, getDefaultMapCreator, inMemoryUniversal, inMemoryUniversalConcurrent, isInsertionOrderPreserved, of, of, ofConcurrent, putAll, remove, remove, removeAll, set, set, setInsertionOrderPreserved, update, update, valueMapapply, 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, sizeprotected CommentedConfigWrapper(C config)
public java.lang.String getComment(java.util.List<java.lang.String> path)
UnmodifiableCommentedConfiggetComment in interface UnmodifiableCommentedConfigpath - the comment's path, each element of the list is a different part of the path.null if there is none.public boolean containsComment(java.util.List<java.lang.String> path)
UnmodifiableCommentedConfigcontainsComment in interface UnmodifiableCommentedConfigpath - 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.public java.lang.String setComment(java.util.List<java.lang.String> path,
java.lang.String comment)
CommentedConfigsetComment in interface CommentedConfigpath - the comment's path, each element of the list is a different part of the path.comment - the comment to setnullpublic java.lang.String removeComment(java.util.List<java.lang.String> path)
CommentedConfigremoveComment in interface CommentedConfigpath - the comment's path, each element of the list is a different part of the path.nullpublic java.util.Map<java.lang.String,java.lang.String> commentMap()
CommentedConfigThe comment map contains only the comments of the direct elements of the configuration, not the comments of their sub-elements.
commentMap in interface CommentedConfigcommentMap in interface UnmodifiableCommentedConfigpublic java.util.Set<? extends CommentedConfig.Entry> entrySet()
UnmodifiableConfigentrySet in interface CommentedConfigentrySet in interface ConfigentrySet in interface UnmodifiableCommentedConfigentrySet in interface UnmodifiableConfigentrySet in class ConfigWrapper<C extends CommentedConfig>public void clearComments()
CommentedConfigclearComments in interface CommentedConfigpublic void putAllComments(java.util.Map<java.lang.String,UnmodifiableCommentedConfig.CommentNode> comments)
CommentedConfigputAllComments in interface CommentedConfigcomments - the comments to setpublic void putAllComments(UnmodifiableCommentedConfig commentedConfig)
CommentedConfigputAllComments in interface CommentedConfigcommentedConfig - the config to copy its commentspublic java.util.Map<java.lang.String,UnmodifiableCommentedConfig.CommentNode> getComments()
UnmodifiableCommentedConfiggetComments in interface UnmodifiableCommentedConfigpublic CommentedConfig createSubConfig()
ConfigConfig.set(List, Object) or Config.add(List, Object).createSubConfig in interface CommentedConfigcreateSubConfig in interface ConfigcreateSubConfig in class ConfigWrapper<C extends CommentedConfig>public java.lang.String toString()
toString in class ConfigWrapper<C extends CommentedConfig>