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
-
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.Returns the value of thefirstName
record component.Returns the value of theformattedName
record component.final int
hashCode()
Returns a hash code value for this object.lastName()
Returns the value of thelastName
record component.Returns the value of themiddleName
record component.prefix()
Returns the value of theprefix
record component.suffix()
Returns the value of thesuffix
record component.final String
toString()
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 aName
record class.- Parameters:
prefix
- the value for theprefix
record componentlastName
- the value for thelastName
record componentmiddleName
- the value for themiddleName
record componentsuffix
- the value for thesuffix
record componentfirstName
- the value for thefirstName
record componentformattedName
- the value for theformattedName
record 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 theprefix
record component.- Returns:
- the value of the
prefix
record component
-
lastName
Returns the value of thelastName
record component.- Returns:
- the value of the
lastName
record component
-
middleName
Returns the value of themiddleName
record component.- Returns:
- the value of the
middleName
record component
-
suffix
Returns the value of thesuffix
record component.- Returns:
- the value of the
suffix
record component
-
firstName
Returns the value of thefirstName
record component.- Returns:
- the value of the
firstName
record component
-
formattedName
Returns the value of theformattedName
record component.- Returns:
- the value of the
formattedName
record component
-