Package com.whatsapp.api.domain.webhook
Record Class Name
java.lang.Object
java.lang.Record
com.whatsapp.api.domain.webhook.Name
public record Name(String prefix, String lastName, String middleName, String suffix, String firstName, String formattedName)
extends Record
The type Name.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.Returns the value of thefirstNamerecord component.Returns the value of theformattedNamerecord component.final inthashCode()Returns a hash code value for this object.lastName()Returns the value of thelastNamerecord component.Returns the value of themiddleNamerecord component.prefix()Returns the value of theprefixrecord component.suffix()Returns the value of thesuffixrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Name
public Name(String prefix, String lastName, String middleName, String suffix, String firstName, String formattedName) Creates an instance of aNamerecord class.- Parameters:
prefix- the value for theprefixrecord componentlastName- the value for thelastNamerecord componentmiddleName- the value for themiddleNamerecord componentsuffix- the value for thesuffixrecord componentfirstName- the value for thefirstNamerecord componentformattedName- the value for theformattedNamerecord 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). -
prefix
Returns the value of theprefixrecord component.- Returns:
- the value of the
prefixrecord component
-
lastName
Returns the value of thelastNamerecord component.- Returns:
- the value of the
lastNamerecord component
-
middleName
Returns the value of themiddleNamerecord component.- Returns:
- the value of the
middleNamerecord component
-
suffix
Returns the value of thesuffixrecord component.- Returns:
- the value of the
suffixrecord component
-
firstName
Returns the value of thefirstNamerecord component.- Returns:
- the value of the
firstNamerecord component
-
formattedName
Returns the value of theformattedNamerecord component.- Returns:
- the value of the
formattedNamerecord component
-