Package com.hbm_m.inventory.recipes
Record Class ArcWelderRecipes.FluidRequirement
java.lang.Object
java.lang.Record
com.hbm_m.inventory.recipes.ArcWelderRecipes.FluidRequirement
- Enclosing class:
- ArcWelderRecipes
Optional fluid requirement.
-
Constructor Summary
ConstructorsConstructorDescriptionFluidRequirement(FluidType type, int amount) Creates an instance of aFluidRequirementrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintamount()Returns the value of theamountrecord component.voidConsume from the tank (call only aftersatisfiedBy(com.hbm_m.inventory.fluid.tank.FluidTank)returns true).final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleansatisfiedBy(FluidTank tank) Returns true if the tank satisfies this requirement.final StringtoString()Returns a string representation of this record class.type()Returns the value of thetyperecord component.
-
Constructor Details
-
FluidRequirement
Creates an instance of aFluidRequirementrecord class.- Parameters:
type- the value for thetyperecord componentamount- the value for theamountrecord component
-
-
Method Details
-
satisfiedBy
Returns true if the tank satisfies this requirement. -
consume
Consume from the tank (call only aftersatisfiedBy(com.hbm_m.inventory.fluid.tank.FluidTank)returns true). -
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 '=='. -
type
Returns the value of thetyperecord component.- Returns:
- the value of the
typerecord component
-
amount
public int amount()Returns the value of theamountrecord component.- Returns:
- the value of the
amountrecord component
-