Record Class InventoryPlacement.Transfer
java.lang.Object
java.lang.Record
net.raphimc.viabedrock.api.model.container.InventoryPlacement.Transfer
- Enclosing class:
InventoryPlacement
public static record InventoryPlacement.Transfer(boolean fromInventory, int source, int destination, int amount)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionTransfer(boolean fromInventory, int source, int destination, int amount) Creates an instance of aTransferrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintamount()Returns the value of theamountrecord component.intReturns the value of thedestinationrecord component.final booleanIndicates whether some other object is "equal to" this one.booleanReturns the value of thefromInventoryrecord component.final inthashCode()Returns a hash code value for this object.intsource()Returns the value of thesourcerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Transfer
public Transfer(boolean fromInventory, int source, int destination, int amount) Creates an instance of aTransferrecord class.- Parameters:
fromInventory- the value for thefromInventoryrecord componentsource- the value for thesourcerecord componentdestination- the value for thedestinationrecord componentamount- the value for theamountrecord component
-
-
Method Details
-
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. All components in this record class are compared with thecomparemethod from their corresponding wrapper classes. -
fromInventory
public boolean fromInventory()Returns the value of thefromInventoryrecord component.- Returns:
- the value of the
fromInventoryrecord component
-
source
public int source()Returns the value of thesourcerecord component.- Returns:
- the value of the
sourcerecord component
-
destination
public int destination()Returns the value of thedestinationrecord component.- Returns:
- the value of the
destinationrecord component
-
amount
public int amount()Returns the value of theamountrecord component.- Returns:
- the value of the
amountrecord component
-