Record Class ResourcePackStructure.Entry

java.lang.Object
java.lang.Record
net.mcreator.minecraft.ResourcePackStructure.Entry
All Implemented Interfaces:
Comparable<ResourcePackStructure.Entry>
Enclosing class:
ResourcePackStructure

public static record ResourcePackStructure.Entry(String path, File override, ResourcePackStructure.EntryType type) extends Record implements Comparable<ResourcePackStructure.Entry>
  • Constructor Details

    • Entry

      public Entry(String path, File override, ResourcePackStructure.EntryType type)
      Creates an instance of a Entry record class.
      Parameters:
      path - the value for the path record component
      override - the value for the override record component
      type - the value for the type record component
  • Method Details

    • fullPath

      public String fullPath()
    • parent

      public ResourcePackStructure.Entry parent()
    • extension

      public String extension()
    • isFolder

      public boolean isFolder()
    • compareTo

      public int compareTo(ResourcePackStructure.Entry o)
      Specified by:
      compareTo in interface Comparable<ResourcePackStructure.Entry>
    • equals

      public boolean equals(Object obj)
      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:
      obj - the object with which to compare
      Returns:
      true if this object is the same as the obj argument; false otherwise.
    • hashCode

      public 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
    • toString

      public 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
    • path

      public String path()
      Returns the value of the path record component.
      Returns:
      the value of the path record component
    • override

      public File override()
      Returns the value of the override record component.
      Returns:
      the value of the override record component
    • type

      Returns the value of the type record component.
      Returns:
      the value of the type record component