Record Class Address
java.lang.Object
java.lang.Record
be.appify.prefab.example.sale.Address
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription@NotNull Stringcity()Returns the value of thecityrecord component.@NotNull Stringcountry()Returns the value of thecountryrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.number()Returns the value of thenumberrecord component.@NotNull StringReturns the value of thepostalCoderecord component.@NotNull Stringstreet()Returns the value of thestreetrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Address
public Address(@NotNull @NotNull String street, String number, @NotNull @NotNull String postalCode, @NotNull @NotNull String city, @NotNull @NotNull String country) Creates an instance of aAddressrecord class.- Parameters:
street- the value for thestreetrecord componentnumber- the value for thenumberrecord componentpostalCode- the value for thepostalCoderecord componentcity- the value for thecityrecord componentcountry- the value for thecountryrecord component
-
-
Method Details
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
street
Returns the value of thestreetrecord component.- Returns:
- the value of the
streetrecord component
-
number
Returns the value of thenumberrecord component.- Returns:
- the value of the
numberrecord component
-
postalCode
Returns the value of thepostalCoderecord component.- Returns:
- the value of the
postalCoderecord component
-
city
Returns the value of thecityrecord component.- Returns:
- the value of the
cityrecord component
-
country
Returns the value of thecountryrecord component.- Returns:
- the value of the
countryrecord component
-