Record Class InaccessibleMessage
java.lang.Object
java.lang.Record
org.teleight.teleightbots.api.objects.InaccessibleMessage
- All Implemented Interfaces:
Serializable,ApiResult,MaybeInaccessibleMessage
public record InaccessibleMessage(@NotNull Chat chat, int messageId, Date date)
extends Record
implements MaybeInaccessibleMessage
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionInaccessibleMessage(@NotNull Chat chat, int messageId, Date date) Creates an instance of aInaccessibleMessagerecord class. -
Method Summary
Modifier and TypeMethodDescription@NotNull Chatchat()Returns the value of thechatrecord component.date()Returns the value of thedaterecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intReturns the value of themessageIdrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
InaccessibleMessage
Creates an instance of aInaccessibleMessagerecord class.- Parameters:
chat- the value for thechatrecord componentmessageId- the value for themessageIdrecord componentdate- the value for thedaterecord 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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
chat
Returns the value of thechatrecord component.- Specified by:
chatin interfaceMaybeInaccessibleMessage- Returns:
- the value of the
chatrecord component
-
messageId
public int messageId()Returns the value of themessageIdrecord component.- Specified by:
messageIdin interfaceMaybeInaccessibleMessage- Returns:
- the value of the
messageIdrecord component
-
date
Returns the value of thedaterecord component.- Specified by:
datein interfaceMaybeInaccessibleMessage- Returns:
- the value of the
daterecord component
-