Package net.minecraft.util.eventlog
Record Class EventLogDirectory.CompressedFile
java.lang.Object
java.lang.Record
net.minecraft.util.eventlog.EventLogDirectory.CompressedFile
- All Implemented Interfaces:
EventLogDirectory.File
- Enclosing class:
EventLogDirectory
public static record EventLogDirectory.CompressedFile(Path path, EventLogDirectory.FileId id)
extends Record
implements EventLogDirectory.File
-
Field Summary
Modifier and TypeFieldDescriptionprivate final EventLogDirectory.FileId
The field for theid
record component.private final Path
The field for thepath
record component. -
Constructor Summary
ConstructorDescriptionCompressedFile
(Path path, EventLogDirectory.FileId id) Creates an instance of aCompressedFile
record class. -
Method Summary
Modifier and TypeMethodDescriptioncompress()
final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.id()
Returns the value of theid
record component.path()
Returns the value of thepath
record component.final String
toString()
Returns a string representation of this record class.
-
Field Details
-
path
The field for thepath
record component. -
id
The field for theid
record component.
-
-
Constructor Details
-
CompressedFile
Creates an instance of aCompressedFile
record class.- Parameters:
path
- the value for thepath
record componentid
- the value for theid
record component
-
-
Method Details
-
openReader
- Specified by:
openReader
in interfaceEventLogDirectory.File
- Throws:
IOException
-
compress
- Specified by:
compress
in interfaceEventLogDirectory.File
-
path
Returns the value of thepath
record component.- Specified by:
path
in interfaceEventLogDirectory.File
- Returns:
- the value of the
path
record component
-
id
Returns the value of theid
record component.- Specified by:
id
in interfaceEventLogDirectory.File
- Returns:
- the value of the
id
record component
-
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)
.
-