Record Class PackagingRequest

java.lang.Object
java.lang.Record
com.simibubi.create.content.logistics.packager.PackagingRequest

public record PackagingRequest(net.minecraft.world.item.ItemStack item, org.apache.commons.lang3.mutable.MutableInt count, String address, int linkIndex, org.apache.commons.lang3.mutable.MutableBoolean finalLink, org.apache.commons.lang3.mutable.MutableInt packageCounter, int orderId, @Nullable PackageOrder context) extends Record
  • Constructor Summary

    Constructors
    Constructor
    Description
    PackagingRequest(net.minecraft.world.item.ItemStack item, org.apache.commons.lang3.mutable.MutableInt count, String address, int linkIndex, org.apache.commons.lang3.mutable.MutableBoolean finalLink, org.apache.commons.lang3.mutable.MutableInt packageCounter, int orderId, PackageOrder context)
    Creates an instance of a PackagingRequest record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the value of the address record component.
    Returns the value of the context record component.
    org.apache.commons.lang3.mutable.MutableInt
    Returns the value of the count record component.
    create(net.minecraft.world.item.ItemStack item, int count, String address, int linkIndex, org.apache.commons.lang3.mutable.MutableBoolean finalLink, int packageCount, int orderId, PackageOrder context)
     
    final boolean
    Indicates whether some other object is "equal to" this one.
    org.apache.commons.lang3.mutable.MutableBoolean
    Returns the value of the finalLink record component.
    int
     
    final int
    Returns a hash code value for this object.
    boolean
     
    net.minecraft.world.item.ItemStack
    Returns the value of the item record component.
    int
    Returns the value of the linkIndex record component.
    int
    Returns the value of the orderId record component.
    org.apache.commons.lang3.mutable.MutableInt
    Returns the value of the packageCounter record component.
    void
    subtract(int toSubtract)
     
    final String
    Returns a string representation of this record class.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • PackagingRequest

      public PackagingRequest(net.minecraft.world.item.ItemStack item, org.apache.commons.lang3.mutable.MutableInt count, String address, int linkIndex, org.apache.commons.lang3.mutable.MutableBoolean finalLink, org.apache.commons.lang3.mutable.MutableInt packageCounter, int orderId, @Nullable PackageOrder context)
      Creates an instance of a PackagingRequest record class.
      Parameters:
      item - the value for the item record component
      count - the value for the count record component
      address - the value for the address record component
      linkIndex - the value for the linkIndex record component
      finalLink - the value for the finalLink record component
      packageCounter - the value for the packageCounter record component
      orderId - the value for the orderId record component
      context - the value for the context record component
  • Method Details

    • create

      public static PackagingRequest create(net.minecraft.world.item.ItemStack item, int count, String address, int linkIndex, org.apache.commons.lang3.mutable.MutableBoolean finalLink, int packageCount, int orderId, @Nullable PackageOrder context)
    • getCount

      public int getCount()
    • subtract

      public void subtract(int toSubtract)
    • isEmpty

      public boolean isEmpty()
    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • item

      public net.minecraft.world.item.ItemStack item()
      Returns the value of the item record component.
      Returns:
      the value of the item record component
    • count

      public org.apache.commons.lang3.mutable.MutableInt count()
      Returns the value of the count record component.
      Returns:
      the value of the count record component
    • address

      public String address()
      Returns the value of the address record component.
      Returns:
      the value of the address record component
    • linkIndex

      public int linkIndex()
      Returns the value of the linkIndex record component.
      Returns:
      the value of the linkIndex record component
    • finalLink

      public org.apache.commons.lang3.mutable.MutableBoolean finalLink()
      Returns the value of the finalLink record component.
      Returns:
      the value of the finalLink record component
    • packageCounter

      public org.apache.commons.lang3.mutable.MutableInt packageCounter()
      Returns the value of the packageCounter record component.
      Returns:
      the value of the packageCounter record component
    • orderId

      public int orderId()
      Returns the value of the orderId record component.
      Returns:
      the value of the orderId record component
    • context

      @Nullable public PackageOrder context()
      Returns the value of the context record component.
      Returns:
      the value of the context record component