Package main.domain.models.users
Class User
java.lang.Object
main.domain.models.users.User
- 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionasAdmin()Promotes the user to admin.voidBuys a ticket and adds it to the user's bought tickets.copy()booleanbooleaninthashCode()id()Returns the user ID.booleanisAdmin()Checks if the user is an admin.booleanChecks if the user owns the specified login.login()Returns the login details.person()Returns the personal details.voidreturnTicket(Ticket ticket) Returns a ticket and removes it from the user's bought tickets.tickets()Returns the list of bought tickets.Sets the login details for the user.Sets the personal details for the user.withTickets(List<Ticket> tickets) Sets the tickets for the user. 
- 
Constructor Details
- 
User
 - 
User
 
 - 
 - 
Method Details
- 
withTickets
 - 
isOwnerOf
Checks if the user owns the specified login.- Parameters:
 login- the login to check- Returns:
 - true if the user owns the login, false otherwise
 
 - 
buyTicket
Buys a ticket and adds it to the user's bought tickets.- Parameters:
 ticket- the ticket to buy
 - 
returnTicket
Returns a ticket and removes it from the user's bought tickets.- Parameters:
 ticket- the ticket to return
 - 
id
 - 
login
 - 
person
 - 
isAdmin
public boolean isAdmin()Checks if the user is an admin.- Returns:
 - true if the user is an admin, false otherwise
 
 - 
tickets
 - 
asAdmin
 - 
with
 - 
with
 - 
copy
 - 
hashCode
 - 
equals
 - 
equals
 
 -