Package net.fabricmc.loom.util
Record Class FileSystemUtil.Delegate
java.lang.Object
java.lang.Record
net.fabricmc.loom.util.FileSystemUtil.Delegate
- All Implemented Interfaces:
AutoCloseable,Supplier<FileSystem>
- Enclosing class:
- FileSystemUtil
public static record FileSystemUtil.Delegate(FileSystem fs, boolean owner)
extends Record
implements AutoCloseable, Supplier<FileSystem>
-
Constructor Summary
ConstructorsConstructorDescriptionDelegate(FileSystem fs, boolean owner)Creates an instance of aDelegaterecord class. -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()booleanIndicates whether some other object is "equal to" this one.fs()Returns the value of thefsrecord component.get()inthashCode()Returns a hash code value for this object.booleanowner()Returns the value of theownerrecord component.toString()Returns a string representation of this record class.
-
Constructor Details
-
Delegate
Creates an instance of aDelegaterecord class.- Parameters:
fs- the value for thefsrecord componentowner- the value for theownerrecord component
-
-
Method Details
-
close
- Specified by:
closein interfaceAutoCloseable- Throws:
IOException
-
get
- Specified by:
getin interfaceSupplier<FileSystem>
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
fs
Returns the value of thefsrecord component.- Returns:
- the value of the
fsrecord component
-
owner
public boolean owner()Returns the value of theownerrecord component.- Returns:
- the value of the
ownerrecord component
-