Package common.helper.entity
Record Class Address
java.lang.Object
java.lang.Record
common.helper.entity.Address
- All Implemented Interfaces:
Entity
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncity()
Returns the value of thecity
record component.country()
Returns the value of thecountry
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.street()
Returns the value of thestreet
record component.toString()
Returns a string representation of this record class.
-
Constructor Details
-
Address
Creates an instance of aAddress
record class.- Parameters:
street
- the value for thestreet
record componentcity
- the value for thecity
record componentcountry
- the value for thecountry
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. -
getEntityName
- Specified by:
getEntityName
in interfaceEntity
-
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)
. -
street
Returns the value of thestreet
record component.- Returns:
- the value of the
street
record component
-
city
Returns the value of thecity
record component.- Returns:
- the value of the
city
record component
-
country
Returns the value of thecountry
record component.- Returns:
- the value of the
country
record component
-