Package ffx.utilities
Record Class FilePathInfo
java.lang.Object
java.lang.Record
ffx.utilities.FilePathInfo
A simple record to hold file path information.
-
Constructor Summary
ConstructorsConstructorDescriptionFilePathInfo(String directory, String baseName, String extension) Creates an instance of aFilePathInforecord class. -
Method Summary
Modifier and TypeMethodDescriptionbaseName()Returns the value of thebaseNamerecord component.Returns the value of thedirectoryrecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of theextensionrecord component.static FilePathInfoCreate a FilePathInfo from a File object.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
FilePathInfo
Creates an instance of aFilePathInforecord class.- Parameters:
directory- the value for thedirectoryrecord componentbaseName- the value for thebaseNamerecord componentextension- the value for theextensionrecord component
-
-
Method Details
-
fromFile
Create a FilePathInfo from a File object.- Parameters:
file- the File object- Returns:
- a FilePathInfo instance
-
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). -
directory
Returns the value of thedirectoryrecord component.- Returns:
- the value of the
directoryrecord component
-
baseName
Returns the value of thebaseNamerecord component.- Returns:
- the value of the
baseNamerecord component
-
extension
Returns the value of theextensionrecord component.- Returns:
- the value of the
extensionrecord component
-