java.lang.Object
com.prog3.ipt.Model.TravelDocumentClasses.TravelDocument
com.prog3.ipt.Model.TravelDocumentClasses.Membership
Membership is a class that extends TravelDocument abstract class
-
Field Summary
-
Constructor Summary
ConstructorDescriptionMembership
(double price, LocalDate issueDate, LocalDate expirationDate, String transactionID, LocalDate startDate) Membership constructor -
Method Summary
Modifier and TypeMethodDescriptionboolean
int
hashCode()
private void
setStartDate
(LocalDate startDate) toString()
Produces a Membership object according to the TravelDocumentFX object calling this methodvoid
updateTravelDocument
(double price, LocalDate issueDate, LocalDate expirationDate, String transactionID, String lineID, String rideID, LocalDate stampDate, LocalDate startDate) Updates Membership 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
-
startDate
-
-
Constructor Details
-
Membership
public Membership(double price, LocalDate issueDate, LocalDate expirationDate, String transactionID, LocalDate startDate) Membership constructor- Parameters:
price
- The price of the membershipissueDate
- The issue date of the membershipexpirationDate
- The date of expire of the membershiptransactionID
- The unique identifier of the transaction which contains travel documents bought by the citizenstartDate
- The validity start date of the membership
-
-
Method Details
-
setStartDate
-
getStartDate
-
equals
- Overrides:
equals
in classTravelDocument
-
hashCode
public int hashCode()- Overrides:
hashCode
in classTravelDocument
-
toString
- Overrides:
toString
in classTravelDocument
-
toTravelDocumentFX
Produces a Membership object according to the TravelDocumentFX object calling this method- Overrides:
toTravelDocumentFX
in 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 Membership object according to new parameters- Specified by:
updateTravelDocument
in classTravelDocument
- Parameters:
price
- The price of the membershipissueDate
- The issue date of the membershipexpirationDate
- The date of expire of the membershiptransactionID
- 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 single ticketstartDate
- The validity start date of the membership
-