Record Class VarbitRead
java.lang.Object
java.lang.Record
com.botwithus.bot.api.model.VarbitRead
- Record Components:
id- the varbit idstate- the state of the varbit's base variablevalue- the decoded bits, or-1when there is no valuedefaultVerified- asVarpRead.defaultVerified(), for the base variable
public record VarbitRead(int id, VarpState state, int value, boolean defaultVerified)
extends Record
One varbit read. A varbit is a bit range of a base variable, so its state is the base's
state:
SET decodes the stored base,
DEFAULT_NOT_SET_CLIENTSIDE decodes the
base's type default (which is what the game reads, and for a varp whose default is
-1 that means every bit of the range is set), and the other two states carry
-1.
NO_SUCH_VARP covers both an unknown varbit id and a
varbit whose base varp does not exist.
-
Constructor Summary
ConstructorsConstructorDescriptionVarbitRead(int id, VarpState state, int value, boolean defaultVerified) Creates an instance of aVarbitReadrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns the value of thedefaultVerifiedrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanhasValue()True whenvalue()is what the game reads.intid()Returns the value of theidrecord component.state()Returns the value of thestaterecord component.final StringtoString()Returns a string representation of this record class.intvalue()Returns the value of thevaluerecord component.
-
Constructor Details
-
VarbitRead
Creates an instance of aVarbitReadrecord class.- Parameters:
id- the value for theidrecord componentstate- the value for thestaterecord componentvalue- the value for thevaluerecord componentdefaultVerified- the value for thedefaultVerifiedrecord component
-
-
Method Details
-
hasValue
public boolean hasValue()True whenvalue()is what the game reads. -
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
id
-
state
-
value
-
defaultVerified
public boolean defaultVerified()Returns the value of thedefaultVerifiedrecord component.- Returns:
- the value of the
defaultVerifiedrecord component
-