Class AbstractCommentedConfig.CommentedEntryWrapper
- java.lang.Object
-
- com.electronwill.nightconfig.core.AbstractConfig.EntryWrapper
-
- com.electronwill.nightconfig.core.AbstractCommentedConfig.CommentedEntryWrapper
-
- All Implemented Interfaces:
CommentedConfig.Entry,Config.Entry,UnmodifiableCommentedConfig.Entry,UnmodifiableConfig.Entry
- Enclosing class:
- AbstractCommentedConfig
protected class AbstractCommentedConfig.CommentedEntryWrapper extends AbstractConfig.EntryWrapper implements CommentedConfig.Entry
-
-
Field Summary
-
Fields inherited from class com.electronwill.nightconfig.core.AbstractConfig.EntryWrapper
mapEntry
-
-
Constructor Summary
Constructors Constructor Description CommentedEntryWrapper(java.util.Map.Entry<java.lang.String,java.lang.Object> mapEntry)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)java.lang.StringgetComment()protected java.util.List<java.lang.String>getPath()inthashCode()java.lang.StringremoveComment()Removes the entry's comment.java.lang.StringsetComment(java.lang.String comment)Sets the entry's comment.-
Methods inherited from class com.electronwill.nightconfig.core.AbstractConfig.EntryWrapper
getKey, getRawValue, setValue
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.electronwill.nightconfig.core.Config.Entry
setValue
-
Methods inherited from interface com.electronwill.nightconfig.core.UnmodifiableConfig.Entry
getByte, getByteOrElse, getChar, getCharOrElse, getInt, getIntOrElse, getKey, getLong, getLongOrElse, getOptional, getOptionalInt, getOptionalLong, getOrElse, getRawValue, getShort, getShortOrElse, getValue, isNull
-
-
-
-
Method Detail
-
getPath
protected java.util.List<java.lang.String> getPath()
-
getComment
public java.lang.String getComment()
- Specified by:
getCommentin interfaceUnmodifiableCommentedConfig.Entry- Returns:
- the entry's comment, may contain several lines
-
setComment
public java.lang.String setComment(java.lang.String comment)
Description copied from interface:CommentedConfig.EntrySets the entry's comment.- Specified by:
setCommentin interfaceCommentedConfig.Entry- Parameters:
comment- the comment to set, may contain several lines.- Returns:
- the previous comment, or
nullif none.
-
removeComment
public java.lang.String removeComment()
Description copied from interface:CommentedConfig.EntryRemoves the entry's comment.- Specified by:
removeCommentin interfaceCommentedConfig.Entry- Returns:
- the previous comment, or
nullif none.
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classAbstractConfig.EntryWrapper
-
hashCode
public int hashCode()
- Overrides:
hashCodein classAbstractConfig.EntryWrapper
-
-