Package com.uca.bookings

## Class Passenger

- java.lang.Object
- - com.uca.bookings.Passenger

    public class Passenger
    extends java.lang.Object

Represent a passenger

### Constructor Summary

Constructors
`Passenger​(java.lang.String firstName, java.lang.String lastName, java.time.ZonedDateTime birthdate, java.lang.String gender, java.lang.String nationality, java.lang.String passeportNumber, java.lang.String countryOfResidence)` Crée une nouvelle instance de l'objet passager.

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `addFidelityPoint​(int i)` Add a specific amout to the passenger fidelity points
`java.time.ZonedDateTime` `getBirthdate()` Getter
`java.util.Set<Booking>` `getBookings()` Getter
`java.lang.String` `getCountryOfResidence()` Getter
`int` `getFidelityPoint()` Getter
`java.lang.String` `getFirstName()` Getter
`java.lang.String` `getGender()` Getter
`java.util.UUID` `getId()` Getter
`java.lang.String` `getLastName()` Getter
`java.lang.String` `getNationality()` Getter
`java.lang.String` `getPassportNumber()` Getter
`int` `hashCode()` Redefinition of hashCode
`void` `removeFidelityPoint​(int i)` Remove a specific amout to the passenger fidelity points
`void` `setCountryOfResidence​(java.lang.String countryOfResidence)` Setter
`void` `setGender​(java.lang.String gender)` Setter
`void` `setPassportNumber​(java.lang.String passportNumber)` Setter
`java.lang.String` `toString()` Redefinition of toString

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait`

### Constructor Detail

#### Passenger

    public Passenger​(java.lang.String firstName,
                     java.lang.String lastName,
                     java.time.ZonedDateTime birthdate,
                     java.lang.String gender,
                     java.lang.String nationality,
                     java.lang.String passeportNumber,
                     java.lang.String countryOfResidence)

Crée une nouvelle instance de l'objet passager.

Parameters:
  `firstName` - Le prénom du passager.
  `lastName` - Le nom de famille du passager.
  `birthdate` - La date de naissance du passager.
  `gender` - Le genre du passager.
  `nationality` - La nationalité du passager.
  `passeportNumber` - Le numéro de passeport du passager.
  `countryOfResidence` - Le pays de résidence du passager.

### Method Detail

#### getId

    public java.util.UUID getId()

Getter

Returns:
  passenger identifier

#### getFirstName

    public java.lang.String getFirstName()

Getter

Returns:
  passenger firstname

#### getLastName

    public java.lang.String getLastName()

Getter

Returns:
  passenger lastname

#### getGender

    public java.lang.String getGender()

Getter

Returns:
  passenger gender

#### getBirthdate

    public java.time.ZonedDateTime getBirthdate()

Getter

Returns:
  passenger date of birth

#### getNationality

    public java.lang.String getNationality()

Getter

Returns:
  passenger nationality

#### getPassportNumber

    public java.lang.String getPassportNumber()

Getter

Returns:
  passenger passport number

#### getCountryOfResidence

    public java.lang.String getCountryOfResidence()

Getter

Returns:
  passenger country of residence

#### getBookings

    public java.util.Set<Booking> getBookings()

Getter

Returns:
  Set of bookings.

#### getFidelityPoint

    public int getFidelityPoint()

Getter

Returns:
  passenger fidelity points

#### setGender

    public void setGender​(java.lang.String gender)

Setter

Parameters:
  `gender` - the passenger mail
Throws:
  `java.lang.IllegalArgumentException` - on null or empty parameter

#### setCountryOfResidence

    public void setCountryOfResidence​(java.lang.String countryOfResidence)

Setter

Parameters:
  `countryOfResidence` - the passenger mail
Throws:
  `java.lang.IllegalArgumentException` - on null or empty parameter

#### setPassportNumber

    public void setPassportNumber​(java.lang.String passportNumber)

Setter

Parameters:
  `passportNumber` - the passenger mail
Throws:
  `java.lang.IllegalArgumentException` - on null or empty parameter

#### addFidelityPoint

    public void addFidelityPoint​(int i)

Add a specific amout to the passenger fidelity points

Parameters:
  `i` - the amount to add
Throws:
  `java.lang.IllegalArgumentException` - on negative i

#### removeFidelityPoint

    public void removeFidelityPoint​(int i)

Remove a specific amout to the passenger fidelity points

Parameters:
  `i` - the amount to add
Throws:
  `java.lang.IllegalArgumentException` - on negative or too big i

#### toString

    public java.lang.String toString()

Redefinition of toString

Overrides:
  `toString` in class `java.lang.Object`
Returns:
  a string refering to firstname and lastname

#### hashCode

    public int hashCode()

Redefinition of hashCode

Overrides:
  `hashCode` in class `java.lang.Object`
Returns:
  the hashcode