Record Class Delivery

java.lang.Object
java.lang.Record
com.ultikits.ultitools.ui.Delivery

public record Delivery(List<org.bukkit.inventory.ItemStack> given, List<org.bukkit.inventory.ItemStack> dropped, List<org.bukkit.inventory.ItemStack> undelivered) extends Record
given + dropped + undelivered equal the input, by item and amount. Copies.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final List<org.bukkit.inventory.ItemStack>
    The field for the dropped record component.
    private final List<org.bukkit.inventory.ItemStack>
    The field for the given record component.
    private final List<org.bukkit.inventory.ItemStack>
    The field for the undelivered record component.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Delivery(List<org.bukkit.inventory.ItemStack> given, List<org.bukkit.inventory.ItemStack> dropped, List<org.bukkit.inventory.ItemStack> undelivered)
    Copies all three partitions.
  • Method Summary

    Modifier and Type
    Method
    Description
    List<org.bukkit.inventory.ItemStack>
    Items dropped at the player's feet; copies.
    final boolean
    Indicates whether some other object is "equal to" this one.
    List<org.bukkit.inventory.ItemStack>
    Items inserted into the inventory; copies.
    final int
    Returns a hash code value for this object.
    final String
    Returns a string representation of this record class.
    List<org.bukkit.inventory.ItemStack>
    Items that could not be delivered; copies.

    Methods inherited from class Object

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

    • given

      private final List<org.bukkit.inventory.ItemStack> given
      The field for the given record component.
    • dropped

      private final List<org.bukkit.inventory.ItemStack> dropped
      The field for the dropped record component.
    • undelivered

      private final List<org.bukkit.inventory.ItemStack> undelivered
      The field for the undelivered record component.
  • Constructor Details

    • Delivery

      public Delivery(List<org.bukkit.inventory.ItemStack> given, List<org.bukkit.inventory.ItemStack> dropped, List<org.bukkit.inventory.ItemStack> undelivered)
      Copies all three partitions.
  • Method Details

    • given

      public List<org.bukkit.inventory.ItemStack> given()
      Items inserted into the inventory; copies.
    • dropped

      public List<org.bukkit.inventory.ItemStack> dropped()
      Items dropped at the player's feet; copies.
    • undelivered

      public List<org.bukkit.inventory.ItemStack> undelivered()
      Items that could not be delivered; copies.
    • 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. All components in this record class are compared with Objects::equals(Object,Object).
      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.