Record Class CustomerResponse
java.lang.Object
java.lang.Record
be.appify.prefab.example.sale.infrastructure.http.CustomerResponse
public record CustomerResponse(String id, long version, PersonName name, Address address, String email)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionCustomerResponse(String id, long version, PersonName name, Address address, String email) Creates an instance of aCustomerResponserecord class. -
Method Summary
Modifier and TypeMethodDescriptionaddress()Returns the value of theaddressrecord component.email()Returns the value of theemailrecord component.final booleanIndicates whether some other object is "equal to" this one.static CustomerResponsefinal inthashCode()Returns a hash code value for this object.id()Returns the value of theidrecord component.name()Returns the value of thenamerecord component.final StringtoString()Returns a string representation of this record class.longversion()Returns the value of theversionrecord component.
-
Constructor Details
-
CustomerResponse
Creates an instance of aCustomerResponserecord class.- Parameters:
id- the value for theidrecord componentversion- the value for theversionrecord componentname- the value for thenamerecord componentaddress- the value for theaddressrecord componentemail- the value for theemailrecord component
-
-
Method Details
-
from
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
id
Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
version
public long version()Returns the value of theversionrecord component.- Returns:
- the value of the
versionrecord component
-
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
address
Returns the value of theaddressrecord component.- Returns:
- the value of the
addressrecord component
-
email
Returns the value of theemailrecord component.- Returns:
- the value of the
emailrecord component
-