Record Class YamlNodeComment
java.lang.Object
java.lang.Record
com.github.siroshun09.configapi.format.yaml.comment.YamlNodeComment
- Record Components:
block
- theYamlBlockComment
inline
- theYamlInlineComment
- All Implemented Interfaces:
Comment
public record YamlNodeComment(@Nullable YamlBlockComment block, @Nullable YamlInlineComment inline)
extends Record
implements Comment
-
Constructor Summary
ConstructorDescriptionYamlNodeComment
(@Nullable YamlBlockComment block, @Nullable YamlInlineComment inline) Creates an instance of aYamlNodeComment
record class. -
Method Summary
Modifier and TypeMethodDescription@Nullable YamlBlockComment
block()
Returns the value of theblock
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.@Nullable YamlInlineComment
inline()
Returns the value of theinline
record component.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
YamlNodeComment
public YamlNodeComment(@Nullable @Nullable YamlBlockComment block, @Nullable @Nullable YamlInlineComment inline) Creates an instance of aYamlNodeComment
record class.
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object)
. -
block
Returns the value of theblock
record component.- Returns:
- the value of the
block
record component
-
inline
Returns the value of theinline
record component.- Returns:
- the value of the
inline
record component
-