java.lang.Object
com.prog3.ipt.Model.TravelDocumentClasses.TravelDocumentFX
TravelDocumentFX is a class made to display content in a TableView JavaFX object.
-
Field Summary
-
Constructor Summary
ConstructorDescriptionTravelDocumentFX
(Membership travelDocument) TravelDocumentFX constructor Builds a TravelDocumentFX object according to a Membership objectTravelDocumentFX
(SingleTicket travelDocument) TravelDocumentFX constructor Builds a TravelDocumentFX object according to a SingleTicket objectTravelDocumentFX
(TravelDocument travelDocument) TravelDocumentFX constructor Builds a TravelDocumentFX object according to the TravelDocument objectTravelDocumentFX
(String travelDocumentID, double price, LocalDate issueDate, LocalDate expirationDate, String transactionID, String lineID, String rideID, LocalDate stampDate, LocalDate startDate) TravelDocumentFX constructor -
Method Summary
Modifier and TypeMethodDescriptionboolean
double
getPrice()
int
hashCode()
protected void
setExpirationDate
(LocalDate expirationDate) protected void
setIssueDate
(LocalDate issueDate) protected void
protected void
setPrice
(double price) protected void
protected void
setStampDate
(LocalDate stampDate) protected void
setStartDate
(LocalDate startDate) protected void
setTransactionID
(String transactionID) protected void
setTravelDocumentID
(String travelDocumentID) toString()
Produces a TravelDocument object according to the TravelDocumentFX object calling this method
-
Field Details
-
travelDocumentID
-
price
private double price -
issueDate
-
expirationDate
-
transactionID
-
lineID
-
rideID
-
stampDate
-
startDate
-
-
Constructor Details
-
TravelDocumentFX
public TravelDocumentFX(String travelDocumentID, double price, LocalDate issueDate, LocalDate expirationDate, String transactionID, String lineID, String rideID, LocalDate stampDate, LocalDate startDate) TravelDocumentFX constructor- Parameters:
travelDocumentID
- The unique identifier of the travel documentprice
- 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 ticketstartDate
- The validity start date of the travel document if it is a membership
-
TravelDocumentFX
TravelDocumentFX constructor Builds a TravelDocumentFX object according to the TravelDocument object- Parameters:
travelDocument
- A reference to a generic TravelDocument object
-
TravelDocumentFX
TravelDocumentFX constructor Builds a TravelDocumentFX object according to a SingleTicket object- Parameters:
travelDocument
- A reference to a SingleTicket object
-
TravelDocumentFX
TravelDocumentFX constructor Builds a TravelDocumentFX object according to a Membership object- Parameters:
travelDocument
- A reference to a Membership object
-
-
Method Details
-
setTravelDocumentID
-
setPrice
protected void setPrice(double price) -
setIssueDate
-
setExpirationDate
-
setTransactionID
-
setLineID
-
setRideID
-
setStampDate
-
setStartDate
-
getTravelDocumentID
-
getPrice
public double getPrice() -
getIssueDate
-
getExpirationDate
-
getTransactionID
-
getLineID
-
getRideID
-
getStampDate
-
getStartDate
-
toTravelDocument
Produces a TravelDocument object according to the TravelDocumentFX object calling this method- Returns:
- A reference to a TravelDocument object
-
equals
-
hashCode
public int hashCode() -
toString
-