Record Class Contact
java.lang.Object
java.lang.Record
org.teleight.teleightbots.api.objects.Contact
- All Implemented Interfaces:
Serializable,ApiResult
public record Contact(String phoneNumber, String firstName, @Nullable String lastName, long userId, @Nullable String vcard)
extends Record
implements ApiResult
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.Returns the value of thefirstNamerecord component.final inthashCode()Returns a hash code value for this object.@Nullable StringlastName()Returns the value of thelastNamerecord component.Returns the value of thephoneNumberrecord component.final StringtoString()Returns a string representation of this record class.longuserId()Returns the value of theuserIdrecord component.@Nullable Stringvcard()Returns the value of thevcardrecord component.
-
Constructor Details
-
Contact
public Contact(String phoneNumber, String firstName, @Nullable @Nullable String lastName, long userId, @Nullable @Nullable String vcard) Creates an instance of aContactrecord class.- Parameters:
phoneNumber- the value for thephoneNumberrecord componentfirstName- the value for thefirstNamerecord componentlastName- the value for thelastNamerecord componentuserId- the value for theuserIdrecord componentvcard- the value for thevcardrecord 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 '=='. -
phoneNumber
Returns the value of thephoneNumberrecord component.- Returns:
- the value of the
phoneNumberrecord component
-
firstName
Returns the value of thefirstNamerecord component.- Returns:
- the value of the
firstNamerecord component
-
lastName
Returns the value of thelastNamerecord component.- Returns:
- the value of the
lastNamerecord component
-
userId
public long userId()Returns the value of theuserIdrecord component.- Returns:
- the value of the
userIdrecord component
-
vcard
Returns the value of thevcardrecord component.- Returns:
- the value of the
vcardrecord component
-