Package net.datafaker.providers.base
Record Class PersonIdNumber
java.lang.Object
java.lang.Record
net.datafaker.providers.base.PersonIdNumber
public record PersonIdNumber(String idNumber, LocalDate birthDate, PersonIdNumber.Gender gender)
extends Record
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionPersonIdNumber(String idNumber, LocalDate birthDate, PersonIdNumber.Gender gender) Creates an instance of aPersonIdNumberrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thebirthDaterecord component.final booleanIndicates whether some other object is "equal to" this one.gender()Returns the value of thegenderrecord component.final inthashCode()Returns a hash code value for this object.idNumber()Returns the value of theidNumberrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
PersonIdNumber
Creates an instance of aPersonIdNumberrecord class.- Parameters:
idNumber- the value for theidNumberrecord componentbirthDate- the value for thebirthDaterecord componentgender- the value for thegenderrecord 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). -
idNumber
Returns the value of theidNumberrecord component.- Returns:
- the value of the
idNumberrecord component
-
birthDate
Returns the value of thebirthDaterecord component.- Returns:
- the value of the
birthDaterecord component
-
gender
Returns the value of thegenderrecord component.- Returns:
- the value of the
genderrecord component
-