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 Details

    • PathToSerializer

      public PathToSerializer(Serializer<?> serializer, String pathWhereToStore, String pathTo)
      Creates an instance of a PathToSerializer record class.
      Parameters:
      serializer - the value for the serializer record component
      pathWhereToStore - the value for the pathWhereToStore record component
      pathTo - the value for the pathTo record component
  • Method Details

    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • serializer

      public Serializer<?> serializer()
      Returns the value of the serializer record component.
      Returns:
      the value of the serializer record component
    • pathWhereToStore

      public String pathWhereToStore()
      Returns the value of the pathWhereToStore record component.
      Returns:
      the value of the pathWhereToStore record component
    • pathTo

      public String pathTo()
      Returns the value of the pathTo record component.
      Returns:
      the value of the pathTo record component