java.lang.Object
com.prog3.ipt.Model.TravelDocumentClasses.TravelDocument
com.prog3.ipt.Model.TravelDocumentClasses.SingleTicket
SingleTicket is a class that extends TravelDocument abstract class
- 
Field Summary
Fields - 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionbooleaninthashCode()private voidprivate voidprivate voidsetStampDate(LocalDate stampDate) toString()Produces a SingleTicket object according to the TravelDocumentFX object calling this methodvoidupdateTravelDocument(double price, LocalDate issueDate, LocalDate expirationDate, String transactionID, String lineID, String rideID, LocalDate stampDate, LocalDate startDate) Updates SingleTicket object according to new parametersMethods inherited from class com.prog3.ipt.Model.TravelDocumentClasses.TravelDocument
getExpirationDate, getIssueDate, getPrice, getTransactionID, getTravelDocumentID, setExpirationDate, setIssueDate, setPrice, setTransactionID, setTravelDocumentID 
- 
Field Details
- 
lineID
 - 
rideID
 - 
stampDate
 
 - 
 - 
Constructor Details
- 
SingleTicket
public SingleTicket(double price, LocalDate issueDate, LocalDate expirationDate, String transactionID, String lineID, String rideID, LocalDate stampDate) SingleTicket constructor- Parameters:
 price- The price of the travel documentissueDate- The issue date of the travel documentexpirationDate- The date of expire of the travel documenttransactionID- The unique identifier of the transaction which contains travel documents bought by the citizenlineID- The unique identifier of the line if the travel document is a single ticketrideID- The unique identifier of the ride if the travel document is a single ticketstampDate- The stamp date of the travel document, in particular a single ticket
 
 - 
 - 
Method Details
- 
setRideID
 - 
setLineID
 - 
setStampDate
 - 
getRideID
 - 
getLineID
 - 
getStampDate
 - 
equals
- Overrides:
 equalsin classTravelDocument
 - 
hashCode
public int hashCode()- Overrides:
 hashCodein classTravelDocument
 - 
toString
- Overrides:
 toStringin classTravelDocument
 - 
toTravelDocumentFX
Produces a SingleTicket object according to the TravelDocumentFX object calling this method- Overrides:
 toTravelDocumentFXin classTravelDocument- Returns:
 - A reference to a TravelDocumentFX object
 
 - 
updateTravelDocument
public void updateTravelDocument(double price, LocalDate issueDate, LocalDate expirationDate, String transactionID, String lineID, String rideID, LocalDate stampDate, LocalDate startDate) Updates SingleTicket object according to new parameters- Specified by:
 updateTravelDocumentin classTravelDocument- Parameters:
 price- The price of the single ticketissueDate- The issue date of the single ticketexpirationDate- The date of expire of the single tickettransactionID- The unique identifier of the transaction which contains travel documents bought by the citizenlineID- The unique identifier of the line for the single ticket boughtrideID- The unique identifier of the ride for the single ticket boughtstampDate- The stamp date of the single ticketstartDate- The validity start date of the travel document if it is a membership
 
 -