Package passport.domain.models.events
Class Event
java.lang.Object
passport.domain.models.events.Event
-
Constructor Summary
ConstructorDescriptionConstructs a new Event with the specified poster and ticket price.Constructs a new Event with the specified poster and a default ticket price.Constructs a new Event with the specified poster and ticket price. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addCapacity
(Integer capacity) Adds capacity to the event's box office.Returns the box office details of the event.Returns the list of evaluations for the event.id()
Returns the event ID.boolean
isAvailableFor
(LocalDate date) Checks if the event is available on the specified date.poster()
Returns the event poster.void
receiveEvaluation
(Evaluation evaluation) Receives an evaluation and adds it to the event.
-
Constructor Details
-
Event
Constructs a new Event with the specified poster and a default ticket price.- Parameters:
poster
- the event poster
-
Event
-
Event
-
Event
-
-
Method Details
-
receiveEvaluation
Receives an evaluation and adds it to the event.- Parameters:
evaluation
- the evaluation to add
-
addCapacity
Adds capacity to the event's box office.- Parameters:
capacity
- the capacity to add
-
isAvailableFor
Checks if the event is available on the specified date.- Parameters:
date
- the date to check- Returns:
- true if the event is available on the date, false otherwise
-
id
-
poster
-
boxOffice
Returns the box office details of the event.- Returns:
- the box office details
-
evaluations
Returns the list of evaluations for the event.- Returns:
- an unmodifiable list of evaluations
-