Package me.deecaad.core.file
Record Class FileReader.PathToSerializer
java.lang.Object
java.lang.Record
me.deecaad.core.file.FileReader.PathToSerializer
- Record Components:
serializer- Type of the serialized object.pathWhereToStore- Where in config should we store the value.pathTo- Where should we pull the values from.
- Enclosing class:
FileReader
public static record FileReader.PathToSerializer(Serializer<?> serializer, String pathWhereToStore, String pathTo)
extends Record
Stores temporary data to help with the 'Path To' feature of serializers. This is saved, so we can
do a "second loop" of serialization which can re-use values that have already been serialized.
This is useful for REALLY long configuration sections, so they don't need to be copy-pasted
between multiple files (just put it once!)
-
Constructor Summary
ConstructorsConstructorDescriptionPathToSerializer(Serializer<?> serializer, String pathWhereToStore, String pathTo) Creates an instance of aPathToSerializerrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.pathTo()Returns the value of thepathTorecord component.Returns the value of thepathWhereToStorerecord component.Serializer<?> Returns the value of theserializerrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
PathToSerializer
Creates an instance of aPathToSerializerrecord class.- Parameters:
serializer- the value for theserializerrecord componentpathWhereToStore- the value for thepathWhereToStorerecord componentpathTo- the value for thepathTorecord 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. All components in this record class are compared withObjects::equals(Object,Object). -
serializer
Returns the value of theserializerrecord component.- Returns:
- the value of the
serializerrecord component
-
pathWhereToStore
Returns the value of thepathWhereToStorerecord component.- Returns:
- the value of the
pathWhereToStorerecord component
-
pathTo
Returns the value of thepathTorecord component.- Returns:
- the value of the
pathTorecord component
-