Class Line

java.lang.Object
com.prog3.ipt.Model.LineRide.Line

public class Line extends Object
Line is a class that represents a line stored into the system's database
  • Field Details

    • lineID

      private String lineID
    • lineLength

      private Integer lineLength
    • lineStartStation

      private String lineStartStation
    • lineStopStation

      private String lineStopStation
    • lineActivationDate

      private LocalDate lineActivationDate
    • lineOpeningHour

      private Time lineOpeningHour
    • lineClosingHour

      private Time lineClosingHour
  • Constructor Details

    • Line

      public Line(String lineID, Integer lineLength, String lineStartStation, String lineStopStation, LocalDate lineActivationDate, Time lineOpeningHour, Time lineClosingHour)
      Line constructor
      Parameters:
      lineID - Index which uniquely identifies a line
      lineLength - Line length expressed in kilometers
      lineStartStation - Line start station
      lineStopStation - Line end station
      lineActivationDate - Line activation date
      lineOpeningHour - Departure time of the first ride of the line
      lineClosingHour - Arrival time of the last ride of the line
  • Method Details

    • setLineID

      private void setLineID(String lineID)
    • setLineLength

      private void setLineLength(Integer lineLength)
    • setLineStartStation

      private void setLineStartStation(String lineStartStation)
    • setLineStopStation

      private void setLineStopStation(String lineStopStation)
    • setLineActivationDate

      private void setLineActivationDate(LocalDate lineActivationDate)
    • setLineOpeningHour

      private void setLineOpeningHour(Time lineOpeningHour)
    • setLineClosingHour

      private void setLineClosingHour(Time lineClosingHour)
    • getLineID

      public String getLineID()
    • getLineLength

      public Integer getLineLength()
    • getLineStartStation

      public String getLineStartStation()
    • getLineStopStation

      public String getLineStopStation()
    • getLineActivationDate

      public LocalDate getLineActivationDate()
    • getLineOpeningHour

      public Time getLineOpeningHour()
    • getLineClosingHour

      public Time getLineClosingHour()
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object