Record Class PackResource.Packed
java.lang.Object
java.lang.Record
kr.toxicity.model.api.pack.PackResource.Packed
- Record Components:
overlay- the overlaypath- the pathestimatedSize- the estimated sizesupplier- the content supplier
- All Implemented Interfaces:
Supplier<byte[]>, PackResource
- Enclosing interface:
PackResource
public static record PackResource.Packed(@Nullable PackOverlay overlay, @NotNull PackPath path, long estimatedSize, @NotNull Supplier<byte[]> supplier)
extends Record
implements PackResource
A simple implementation of
PackResource.- Since:
- 1.15.2
-
Nested Class Summary
Nested classes/interfaces inherited from interface PackResource
PackResource.Packed -
Constructor Summary
ConstructorsConstructorDescriptionPacked(@Nullable PackOverlay overlay, @NotNull PackPath path, long estimatedSize, @NotNull Supplier<byte[]> supplier) Creates an instance of aPackedrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.longReturns the value of theestimatedSizerecord component.byte[]get()final inthashCode()Returns a hash code value for this object.@Nullable PackOverlayoverlay()Returns the value of theoverlayrecord component.@NotNull PackPathpath()Returns the value of thepathrecord component.@NotNull Supplier<byte[]> supplier()Returns the value of thesupplierrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Packed
public Packed(@Nullable @Nullable PackOverlay overlay, @NotNull @NotNull PackPath path, long estimatedSize, @NotNull @NotNull Supplier<byte[]> supplier) Creates an instance of aPackedrecord class.- Parameters:
overlay- the value for theoverlayrecord componentpath- the value for thepathrecord componentestimatedSize- the value for theestimatedSizerecord componentsupplier- the value for thesupplierrecord component
-
-
Method Details
-
get
-
toString
-
hashCode
-
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 thecomparemethod from their corresponding wrapper classes. -
overlay
Returns the value of theoverlayrecord component.- Specified by:
overlayin interfacePackResource- Returns:
- the value of the
overlayrecord component
-
path
Returns the value of thepathrecord component.- Specified by:
pathin interfacePackResource- Returns:
- the value of the
pathrecord component
-
estimatedSize
public long estimatedSize()Returns the value of theestimatedSizerecord component.- Specified by:
estimatedSizein interfacePackResource- Returns:
- the value of the
estimatedSizerecord component
-
supplier
-