Record Class ConfigSerializer.SerializationArgs<T>
java.lang.Object
java.lang.Record
dev.crafty.core.config.serializer.ConfigSerializer.SerializationArgs<T>
- Enclosing interface:
ConfigSerializer<T>
public static record ConfigSerializer.SerializationArgs<T>(T value, SectionWrapper section, YamlConfigurationWrapper parent, String path, File configFile, boolean save)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionSerializationArgs
(T value, SectionWrapper section, YamlConfigurationWrapper parent, String path, File configFile) SerializationArgs
(T value, SectionWrapper section, YamlConfigurationWrapper parent, String path, File configFile, boolean save) Creates an instance of aSerializationArgs
record class.SerializationArgs
(T value, YamlConfigurationWrapper parent, String path, File configFile) -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theconfigFile
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.parent()
Returns the value of theparent
record component.path()
Returns the value of thepath
record component.boolean
save()
Returns the value of thesave
record component.section()
Returns the value of thesection
record component.final String
toString()
Returns a string representation of this record class.value()
Returns the value of thevalue
record component.
-
Constructor Details
-
SerializationArgs
public SerializationArgs(T value, SectionWrapper section, YamlConfigurationWrapper parent, String path, File configFile) -
SerializationArgs
-
SerializationArgs
public SerializationArgs(T value, SectionWrapper section, YamlConfigurationWrapper parent, String path, File configFile, boolean save) Creates an instance of aSerializationArgs
record class.- Parameters:
value
- the value for thevalue
record componentsection
- the value for thesection
record componentparent
- the value for theparent
record componentpath
- the value for thepath
record componentconfigFile
- the value for theconfigFile
record componentsave
- the value for thesave
record component
-
-
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. Reference components are compared withObjects::equals(Object,Object)
; primitive components are compared with '=='. -
value
Returns the value of thevalue
record component.- Returns:
- the value of the
value
record component
-
section
Returns the value of thesection
record component.- Returns:
- the value of the
section
record component
-
parent
Returns the value of theparent
record component.- Returns:
- the value of the
parent
record component
-
path
Returns the value of thepath
record component.- Returns:
- the value of the
path
record component
-
configFile
Returns the value of theconfigFile
record component.- Returns:
- the value of the
configFile
record component
-
save
public boolean save()Returns the value of thesave
record component.- Returns:
- the value of the
save
record component
-