Record Class InventoryRequestStorage

java.lang.Object
java.lang.Record
net.raphimc.viabedrock.protocol.storage.InventoryRequestStorage

public record InventoryRequestStorage(ItemStackRequestInfo requestInfo, int javaRevision, Container prevCursorContainer, List<Container> prevContainers) extends Record
  • Constructor Details

    • InventoryRequestStorage

      public InventoryRequestStorage(ItemStackRequestInfo requestInfo, int javaRevision, Container prevCursorContainer, List<Container> prevContainers)
      Creates an instance of a InventoryRequestStorage record class.
      Parameters:
      requestInfo - the value for the requestInfo record component
      javaRevision - the value for the javaRevision record component
      prevCursorContainer - the value for the prevCursorContainer record component
      prevContainers - the value for the prevContainers record component
  • Method Details

    • 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.
    • requestInfo

      public ItemStackRequestInfo requestInfo()
      Returns the value of the requestInfo record component.
      Returns:
      the value of the requestInfo record component
    • javaRevision

      public int javaRevision()
      Returns the value of the javaRevision record component.
      Returns:
      the value of the javaRevision record component
    • prevCursorContainer

      public Container prevCursorContainer()
      Returns the value of the prevCursorContainer record component.
      Returns:
      the value of the prevCursorContainer record component
    • prevContainers

      public List<Container> prevContainers()
      Returns the value of the prevContainers record component.
      Returns:
      the value of the prevContainers record component