Record Class ComponentRef
java.lang.Object
java.lang.Record
com.botwithus.bot.api.model.ComponentRef
Identifies a component by its owning interface and component id within that
interface. Input shape for batched component lookups
(
GameAPI.getComponents(List)).-
Constructor Summary
ConstructorsConstructorDescriptionComponentRef(int interfaceId, int componentId) Creates an instance of aComponentRefrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the value of thecomponentIdrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intReturns the value of theinterfaceIdrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ComponentRef
public ComponentRef(int interfaceId, int componentId) Creates an instance of aComponentRefrecord class.- Parameters:
interfaceId- the value for theinterfaceIdrecord componentcomponentId- the value for thecomponentIdrecord 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. -
interfaceId
public int interfaceId()Returns the value of theinterfaceIdrecord component.- Returns:
- the value of the
interfaceIdrecord component
-
componentId
public int componentId()Returns the value of thecomponentIdrecord component.- Returns:
- the value of the
componentIdrecord component
-