Package com.saicone.settings.node
Class NodeValue<V>
java.lang.Object
com.saicone.settings.node.NodeValue<V>
- Type Parameters:
- V- the value type of the node.
- All Implemented Interfaces:
- SettingsNode,- com.saicone.types.AnyObject<Object>
- Direct Known Subclasses:
- NodeKey
Abstract class that represents a node multi-layer value along with comments.
Any type transformation will be cached.
Any type transformation will be cached.
- 
Nested Class SummaryNested classes/interfaces inherited from interface com.saicone.types.AnyObjectcom.saicone.types.AnyObject.Registry
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescription<E> E<E> E<E,C extends Collection<E>> 
 CasCollection(@NotNull com.saicone.types.TypeParser<E> parser, C collection) <E extends Enum<E>>
 E<E extends Enum<E>>
 EasOptional(@NotNull com.saicone.types.TypeParser<E> parser) booleanGet the facing value inside the node.Get side comment from the node.Get the value that will be used to save this node.Get top comment from the node.getValue()inthashCode()booleanCheck if the current node has any side comment.booleanCheck if the current node has any top comment.static @NotNull SettingsNodeCreate a node value with the given object.setSideComment(@Nullable List<String> sideComment) Replace the node side comment.setSourceValue(@Nullable Object value) Replace the actual source value.setTopComment(@Nullable List<String> topComment) Replace the node top comment.Set the value that will be return onAnyObject.getValue()and change this node instance depending on actual value.
 If source value is not set will be replaced.toString()Methods inherited from class java.lang.Objectclone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.saicone.types.AnyObjectas, as, asArray, asArray, asArray, asArray, asBigDecimal, asBigDecimal, asBigInteger, asBigInteger, asBoolean, asBoolean, asByte, asByte, asChar, asChar, asDouble, asDouble, asFloat, asFloat, asInt, asInt, asList, asLong, asLong, asMap, asMap, asNumber, asNumber, asSet, asShort, asShort, asString, asString, asUniqueId, asUniqueIdMethods inherited from interface com.saicone.settings.SettingsNodeaddSideComment, addTopComment, asListNode, asLiteralObject, asMapNode, asObjectNode, copy, copy, copy, delete, delete, edit, edit, getKey, getParent, getRoot, isEmpty, isList, isMap, isObject, isReal, isRoot, merge, mergeComment, move, moveRoot, parse, parse, replaceArgs, replaceArgs, setKey, setParent
- 
Constructor Details- 
NodeValueConstructs a node value with the given object.- Parameters:
- value- the value of the node.
 
 
- 
- 
Method Details- 
ofCreate a node value with the given object.- Parameters:
- object- the object to wrap as node value.
- Returns:
- a settings node that represents the node value.
 
- 
hasTopCommentpublic boolean hasTopComment()Description copied from interface:SettingsNodeCheck if the current node has any top comment.- Specified by:
- hasTopCommentin interface- SettingsNode
- Returns:
- true if the node contains a top comment.
 
- 
hasSideCommentpublic boolean hasSideComment()Description copied from interface:SettingsNodeCheck if the current node has any side comment.- Specified by:
- hasSideCommentin interface- SettingsNode
- Returns:
- true if the node contains a side comment.
 
- 
getValue- Specified by:
- getValuein interface- com.saicone.types.AnyObject<V>
 
- 
getFaceValueGet the facing value inside the node.- Returns:
- the value that was set after node creation, null otherwise.
 
- 
getSourceValueDescription copied from interface:SettingsNodeGet the value that will be used to save this node.- Specified by:
- getSourceValuein interface- SettingsNode
- Returns:
- a saved source value, null otherwise.
 
- 
getTopCommentDescription copied from interface:SettingsNodeGet top comment from the node.- Specified by:
- getTopCommentin interface- SettingsNode
- Returns:
- a comment if is set, null otherwise.
 
- 
getSideCommentDescription copied from interface:SettingsNodeGet side comment from the node.- Specified by:
- getSideCommentin interface- SettingsNode
- Returns:
- a comment if is set, null otherwise.
 
- 
setValueDescription copied from interface:SettingsNodeSet the value that will be return onAnyObject.getValue()and change this node instance depending on actual value.
 If source value is not set will be replaced.- Specified by:
- setValuein interface- SettingsNode
- Parameters:
- value- the value to set.
- Returns:
- the effective node in this operation, normally this node.
 
- 
setSourceValueDescription copied from interface:SettingsNodeReplace the actual source value.- Specified by:
- setSourceValuein interface- SettingsNode
- Parameters:
- value- the source value to set.
- Returns:
- the effective node in this operation, normally this node.
 
- 
setTopCommentDescription copied from interface:SettingsNodeReplace the node top comment.- Specified by:
- setTopCommentin interface- SettingsNode
- Parameters:
- topComment- the comment to set.
- Returns:
- the effective node in this operation, normally this node.
 
- 
setSideCommentDescription copied from interface:SettingsNodeReplace the node side comment.- Specified by:
- setSideCommentin interface- SettingsNode
- Parameters:
- sideComment- the comment to set.
- Returns:
- the effective node in this operation, normally this node.
 
- 
as- Specified by:
- asin interface- com.saicone.types.AnyObject<V>
 
- 
as@Nullable public <E> E as(@NotNull @NotNull com.saicone.types.TypeParser<E> parser, @Nullable E def) - Specified by:
- asin interface- com.saicone.types.AnyObject<V>
 
- 
asOptional@NotNull public <E> @NotNull Optional<E> asOptional(@NotNull @NotNull com.saicone.types.TypeParser<E> parser) - Specified by:
- asOptionalin interface- com.saicone.types.AnyObject<V>
 
- 
asCollection@NotNull public <E,C extends Collection<E>> C asCollection(@NotNull @NotNull com.saicone.types.TypeParser<E> parser, @NotNull C collection) - Specified by:
- asCollectionin interface- com.saicone.types.AnyObject<V>
 
- 
asEnum- Specified by:
- asEnumin interface- com.saicone.types.AnyObject<V>
 
- 
asEnum- Specified by:
- asEnumin interface- com.saicone.types.AnyObject<V>
 
- 
toString
- 
equals
- 
hashCodepublic int hashCode()
 
-