Record Class FluidOperationResult
java.lang.Object
java.lang.Record
com.refinedmods.refinedstorage.common.api.support.resource.FluidOperationResult
@API(status=STABLE,
since="2.0.0-milestone.4.5")
public record FluidOperationResult(net.minecraft.world.item.ItemStack container, PlatformResourceKey fluid, long amount)
extends Record
-
Constructor Summary
ConstructorDescriptionFluidOperationResult
(net.minecraft.world.item.ItemStack container, PlatformResourceKey fluid, long amount) Creates an instance of aFluidOperationResult
record class. -
Method Summary
Modifier and TypeMethodDescriptionlong
amount()
Returns the value of theamount
record component.net.minecraft.world.item.ItemStack
Returns the value of thecontainer
record component.final boolean
Indicates whether some other object is "equal to" this one.fluid()
Returns the value of thefluid
record component.final int
hashCode()
Returns a hash code value for this object.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
FluidOperationResult
public FluidOperationResult(net.minecraft.world.item.ItemStack container, PlatformResourceKey fluid, long amount) Creates an instance of aFluidOperationResult
record class.- Parameters:
container
- the value for thecontainer
record componentfluid
- the value for thefluid
record componentamount
- the value for theamount
record component
-
-
Method Details
-
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 '=='. -
container
public net.minecraft.world.item.ItemStack container()Returns the value of thecontainer
record component.- Returns:
- the value of the
container
record component
-
fluid
Returns the value of thefluid
record component.- Returns:
- the value of the
fluid
record component
-
amount
public long amount()Returns the value of theamount
record component.- Returns:
- the value of the
amount
record component
-