Record Class VarbitType
java.lang.Object
java.lang.Record
com.botwithus.bot.api.model.VarbitType
- Record Components:
id- the varbit type IDvarId- the base variable id the bits are read fromdomainType- the variable domain (0= player varp)lsb- least-significant bit index, inclusivemsb- most-significant bit index, inclusive
Varbit (variable bit) definition from the game cache. A varbit is a bit-range
view onto a base variable: bits
[lsb, msb] (inclusive) of variable
varId in domain domainType (0 = player varp).
Decoding lives consumer-side — the producer exposes only raw variable
reads, and VariableAPI.getVarbit(int)
reads the base variable then shifts/masks with these fields.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionVarbitType(int id, int varId, int domainType, int lsb, int msb) Creates an instance of aVarbitTyperecord class. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the value of thedomainTyperecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intid()Returns the value of theidrecord component.intlsb()Returns the value of thelsbrecord component.intmsb()Returns the value of themsbrecord component.final StringtoString()Returns a string representation of this record class.intvarId()Returns the value of thevarIdrecord component.
-
Constructor Details
-
VarbitType
public VarbitType(int id, int varId, int domainType, int lsb, int msb) Creates an instance of aVarbitTyperecord class.- Parameters:
id- the value for theidrecord componentvarId- the value for thevarIdrecord componentdomainType- the value for thedomainTyperecord componentlsb- the value for thelsbrecord componentmsb- the value for themsbrecord 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. -
id
-
varId
-
domainType
public int domainType()Returns the value of thedomainTyperecord component.- Returns:
- the value of the
domainTyperecord component
-
lsb
-
msb
-