Record Class StoragePath

java.lang.Object
java.lang.Record
dev.turboism.sdk.storage.StoragePath
Record Components:
root - runtime-selected lifetime and ownership root
relativePath - normalized slash-separated relative text, never an absolute path, URI, drive path, parent traversal, or symbolic-link authority

public record StoragePath(StorageRoot root, String relativePath) extends Record
Portable logical path below one plugin-owned storage root.
  • Constructor Details

    • StoragePath

      public StoragePath(StorageRoot root, String relativePath)
      Validates the untrusted logical path syntax before runtime confinement checks.
      Parameters:
      root - selected plugin storage root
      relativePath - portable confined logical path text
      Throws:
      NullPointerException - if a component is null
      IllegalArgumentException - if the relative text is blank or non-portable
  • 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.
    • root

      public StorageRoot root()
      Returns the value of the root record component.
      Returns:
      the value of the root record component
    • relativePath

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