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 Summary
ConstructorsConstructorDescriptionInventoryRequestStorage(ItemStackRequestInfo requestInfo, int javaRevision, Container prevCursorContainer, List<Container> prevContainers) Creates an instance of aInventoryRequestStoragerecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intReturns the value of thejavaRevisionrecord component.Returns the value of theprevContainersrecord component.Returns the value of theprevCursorContainerrecord component.Returns the value of therequestInforecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
InventoryRequestStorage
public InventoryRequestStorage(ItemStackRequestInfo requestInfo, int javaRevision, Container prevCursorContainer, List<Container> prevContainers) Creates an instance of aInventoryRequestStoragerecord class.- Parameters:
requestInfo- the value for therequestInforecord componentjavaRevision- the value for thejavaRevisionrecord componentprevCursorContainer- the value for theprevCursorContainerrecord componentprevContainers- the value for theprevContainersrecord component
-
-
Method Details
-
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 '=='. -
requestInfo
Returns the value of therequestInforecord component.- Returns:
- the value of the
requestInforecord component
-
javaRevision
public int javaRevision()Returns the value of thejavaRevisionrecord component.- Returns:
- the value of the
javaRevisionrecord component
-
prevCursorContainer
Returns the value of theprevCursorContainerrecord component.- Returns:
- the value of the
prevCursorContainerrecord component
-
prevContainers
Returns the value of theprevContainersrecord component.- Returns:
- the value of the
prevContainersrecord component
-