Record Class UpdateReceivedEvent
java.lang.Object
java.lang.Record
org.teleight.teleightbots.event.bot.UpdateReceivedEvent
- All Implemented Interfaces:
Event
public record UpdateReceivedEvent(@NotNull TelegramBot bot, @NotNull Update update, @NotNull String json)
extends Record
implements Event
-
Constructor Summary
ConstructorsConstructorDescriptionUpdateReceivedEvent(@NotNull TelegramBot bot, @NotNull Update update, @NotNull String json) Creates an instance of aUpdateReceivedEventrecord class. -
Method Summary
Modifier and TypeMethodDescription@NotNull TelegramBotbot()Returns the value of thebotrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.@NotNull Stringjson()Returns the value of thejsonrecord component.final StringtoString()Returns a string representation of this record class.@NotNull Updateupdate()Returns the value of theupdaterecord component.
-
Constructor Details
-
UpdateReceivedEvent
public UpdateReceivedEvent(@NotNull @NotNull TelegramBot bot, @NotNull @NotNull Update update, @NotNull @NotNull String json) Creates an instance of aUpdateReceivedEventrecord class.- Parameters:
bot- the value for thebotrecord componentupdate- the value for theupdaterecord componentjson- the value for thejsonrecord 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. All components in this record class are compared withObjects::equals(Object,Object). -
bot
Returns the value of thebotrecord component. -
update
Returns the value of theupdaterecord component.- Returns:
- the value of the
updaterecord component
-
json
Returns the value of thejsonrecord component.- Returns:
- the value of the
jsonrecord component
-