public class Contact extends Object
Modifier and Type | Field and Description |
---|---|
static Comparator<Contact> |
COMPARATOR_USING_ID
comparator of contact, using ID parameter
|
Constructor and Description |
---|
Contact()
default constructor
|
Contact(int id,
String name,
String phoneNumber,
String mail)
Constructor of the contact
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object c)
To know if two contact are the same
|
int |
getId()
get the id of the contact
|
String |
getMail()
get the adress mail of the contact
|
String |
getName()
get the name of the contact
|
String |
getPhoneNumber()
get the phone number of the contact
|
int |
hashCode() |
void |
setId(int id)
Set the id
|
void |
setMail(String mail)
Set the phone number
|
void |
setName(String name)
Set the phone number
|
void |
setPhoneNumber(String phoneNumber)
Set the phone number
|
String |
toString() |
public static final Comparator<Contact> COMPARATOR_USING_ID
public Contact(int id, String name, String phoneNumber, String mail)
id
- the contact idname
- the contact namephoneNumber
- the contact phone numbermail
- the contact mailpublic Contact()
public int getId()
public void setId(int id)
id
- The idpublic String getName()
public void setName(String name)
name
- the contact namepublic String getMail()
public void setMail(String mail)
mail
- the contact adress mailpublic String getPhoneNumber()
public void setPhoneNumber(String phoneNumber)
phoneNumber
- the contact phone numberpublic boolean equals(Object c)
Copyright © 2020 City of Paris. All rights reserved.