Package passport.domain.models.users
Class Person
java.lang.Object
passport.domain.models.users.Person
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncpf()
Returns the CPF of the person.boolean
Checks if the current object is equal to another object.boolean
Checks if the current person is equal to another person.int
hashCode()
Returns the hash code of the person.name()
Returns the name of the person.Creates a new Person with the specified CPF, keeping the current name.Creates a new Person with the specified name, keeping the current CPF.
-
Constructor Details
-
Person
-
-
Method Details
-
name
-
cpf
-
withName
-
withCpf
-
equals
Checks if the current person is equal to another person.- Parameters:
other
- the other person to compare- Returns:
- true if the persons are equal, false otherwise
-
equals
-
hashCode
-