Record Class MethodSendEvent<R extends Serializable>
java.lang.Object
java.lang.Record
org.teleight.teleightbots.event.bot.MethodSendEvent<R>
- All Implemented Interfaces:
Event
public record MethodSendEvent<R extends Serializable>(@NotNull TelegramBot bot, @NotNull ApiMethod<R extends Serializable> method, R extends Serializable result)
extends Record
implements Event
-
Constructor Summary
ConstructorsConstructorDescriptionMethodSendEvent(@NotNull TelegramBot bot, @NotNull ApiMethod<R> method, R result) Creates an instance of aMethodSendEventrecord 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.method()Returns the value of themethodrecord component.result()Returns the value of theresultrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
MethodSendEvent
public MethodSendEvent(@NotNull @NotNull TelegramBot bot, @NotNull @NotNull ApiMethod<R> method, @NotNull R result) Creates an instance of aMethodSendEventrecord class.- Parameters:
bot- the value for thebotrecord componentmethod- the value for themethodrecord componentresult- the value for theresultrecord 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 withObjects::equals(Object,Object). -
bot
Returns the value of thebotrecord component. -
method
-
result
Returns the value of theresultrecord component.- Returns:
- the value of the
resultrecord component
-