Package com.uca.bookings

## Class Customer

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

    public class Customer
    extends java.lang.Object

Represent a customer of the company

### Constructor Summary

Constructors
`Customer​(java.lang.String firstName, java.lang.String lastName, java.lang.String email, java.lang.String address, PaymentMethod paymentMethod)` Constructor

### Method Summary

All Methods Instance Methods Concrete Methods
`java.lang.String` `getAddress()` Getter
`java.util.Set<Booking>` `getBookings()` Getter
`java.lang.String` `getEmail()` Getter
`java.lang.String` `getFirstName()` Getter
`java.util.UUID` `getId()` Getter
`java.lang.String` `getLastName()` Getter
`PaymentMethod` `getPaymentMethod()` Getter
`int` `hashCode()` Redefinition of hashCode
`void` `removeBooking​(Booking booking)` Remove given booking.
`void` `setAdress​(java.lang.String address)` Setter
`void` `setEmail​(java.lang.String email)` Setter
`void` `setPaymentMethod​(PaymentMethod paymentMethod)` 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

#### Customer

    public Customer​(java.lang.String firstName,
                    java.lang.String lastName,
                    java.lang.String email,
                    java.lang.String address,
                    PaymentMethod paymentMethod)

Constructor

Parameters:
  `firstName` - Customer firstname
  `lastName` - Customer lastname
  `email` - Customer email
  `address` - Customer address
  `paymentMethod` - Customer means of payment
Throws:
  `java.lang.IllegalArgumentException` - On null or non-valid argument

### Method Detail

#### getFirstName

    public java.lang.String getFirstName()

Getter

Returns:
  customer firstname

#### getLastName

    public java.lang.String getLastName()

Getter

Returns:
  customer lastname

#### getEmail

    public java.lang.String getEmail()

Getter

Returns:
  customer mail

#### getAddress

    public java.lang.String getAddress()

Getter

Returns:
  customer address

#### getId

    public java.util.UUID getId()

Getter

Returns:
  customer identifier

#### getPaymentMethod

    public PaymentMethod getPaymentMethod()

Getter

Returns:
  a safe version of customer payment method

#### getBookings

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

Getter

Returns:
  Set of bookings.

#### setEmail

    public void setEmail​(java.lang.String email)

Setter

Parameters:
  `email` - the customer email
Throws:
  `java.lang.IllegalArgumentException` - on null or empty parameter

#### setAdress

    public void setAdress​(java.lang.String address)

Setter

Parameters:
  `address` - the customer address
Throws:
  `java.lang.IllegalArgumentException` - on null or empty parameter

#### setPaymentMethod

    public void setPaymentMethod​(PaymentMethod paymentMethod)

Setter

Parameters:
  `paymentMethod` - the customer payment method
Throws:
  `java.lang.IllegalArgumentException` - on null parameter

#### removeBooking

    public void removeBooking​(Booking booking)

Remove given booking.

Parameters:
  `booking` - Booking to remove.
Throws:
  `java.lang.IllegalArgumentException` - on null or non existent parameter

#### 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