Record Class TempLocation
java.lang.Object
java.lang.Record
de.firemage.autograder.core.errorprone.TempLocation
- All Implemented Interfaces:
Closeable,Serializable,AutoCloseable
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionTempLocation(File tempLocation) Creates an instance of aTempLocationrecord class. -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()createTempDirectory(String prefix) createTempFile(String name) final booleanIndicates whether some other object is "equal to" this one.static TempLocationfinal inthashCode()Returns a hash code value for this object.static TempLocationstatic TempLocationrandom()Returns the value of thetempLocationrecord component.toPath()Returns the path of the temporary location.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
TempLocation
Creates an instance of aTempLocationrecord class.- Parameters:
tempLocation- the value for thetempLocationrecord component
-
-
Method Details
-
fromPath
-
of
-
random
-
createTempDirectory
- Throws:
IOException
-
createTempFile
- Throws:
IOException
-
toPath
Returns the path of the temporary location.- Returns:
- the path of the temporary location
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-
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). -
tempLocation
Returns the value of thetempLocationrecord component.- Returns:
- the value of the
tempLocationrecord component
-