Record Class VarcChangeEvent
java.lang.Object
java.lang.Record
com.botwithus.bot.api.event.VarcChangeEvent
- Record Components:
varId- the varc ID that changedoldValue- the previous valuenewValue- the new valuetimestamp- event creation time in milliseconds since epoch
- All Implemented Interfaces:
GameEvent
public record VarcChangeEvent(int varId, int oldValue, int newValue, long timestamp)
extends Record
implements GameEvent
Fired when a client variable (varc) changes value. Distinct from
VarChangeEvent — varp and varc live in separate id namespaces and
separate VarDomain instances on the producer side, so subscribers must be
able to discriminate.-
Constructor Summary
ConstructorsConstructorDescriptionVarcChangeEvent(int varId, int oldValue, int newValue) VarcChangeEvent(int varId, int oldValue, int newValue, long timestamp) Creates an instance of aVarcChangeEventrecord 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.intnewValue()Returns the value of thenewValuerecord component.intoldValue()Returns the value of theoldValuerecord component.longReturns the value of thetimestamprecord component.final StringtoString()Returns a string representation of this record class.intvarId()Returns the value of thevarIdrecord component.
-
Constructor Details
-
VarcChangeEvent
public VarcChangeEvent(int varId, int oldValue, int newValue) -
VarcChangeEvent
public VarcChangeEvent(int varId, int oldValue, int newValue, long timestamp) Creates an instance of aVarcChangeEventrecord class.
-
-
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. -
varId
-
oldValue
-
newValue
-
timestamp
-