Package edu.suffolk.litlab.efsp.model
Record Class ContactInformation
java.lang.Object
java.lang.Record
edu.suffolk.litlab.efsp.model.ContactInformation
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionContactInformation(String email) Minimal constructor, empty lists and empty optionals.ContactInformation(Map<ContactInformation.PhoneType, String> phoneNumbers, Optional<Address> address, Optional<Address> mailingAddress, Optional<String> email) Creates an instance of aContactInformationrecord 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.getEmail()final inthashCode()Returns a hash code value for this object.Returns the value of themailingAddressrecord component.Returns the value of thephoneNumbersrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ContactInformation
Minimal constructor, empty lists and empty optionals. -
ContactInformation
public ContactInformation(Map<ContactInformation.PhoneType, String> phoneNumbers, Optional<Address> address, Optional<Address> mailingAddress, Optional<String> email) Creates an instance of aContactInformationrecord class.- Parameters:
phoneNumbers- the value for thephoneNumbersrecord componentaddress- the value for theaddressrecord componentmailingAddress- the value for themailingAddressrecord componentemail- the value for theemailrecord component
-
-
Method Details
-
getPhoneNumbers
-
getEmail
-
getAddress
-
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). -
phoneNumbers
Returns the value of thephoneNumbersrecord component.- Returns:
- the value of the
phoneNumbersrecord component
-
address
Returns the value of theaddressrecord component.- Returns:
- the value of the
addressrecord component
-
mailingAddress
Returns the value of themailingAddressrecord component.- Returns:
- the value of the
mailingAddressrecord component
-
email
Returns the value of theemailrecord component.- Returns:
- the value of the
emailrecord component
-