Class Stop


  • public class Stop
    extends java.lang.Object
    Define the content of a Stop record.
    • Constructor Detail

      • Stop

        public Stop​(int trainId,
                    int seq)
        Create a new stop with default values.
        Parameters:
        trainId - The parent train id.
        seq - The next stop sequence number.
        Throws:
        java.lang.IllegalArgumentException - STOP_ADD_FAIL
      • Stop

        public Stop​(int stopId,
                    int trainId,
                    int stationId,
                    int seq,
                    int duration,
                    int nextSpeed,
                    int arriveTime,
                    int departTime,
                    int stagingTrack,
                    java.lang.String stopNotes)
    • Method Detail

      • getCopy

        public Stop getCopy​(int trainId,
                            int stationId,
                            int seq)
        Make a copy of the stop.
        Parameters:
        trainId - The new train id, if zero use the current train id.
        stationId - The new station id. If zero use the current station id.
        seq - The sequence for the new stop.
        Returns:
        a new Stop instance.
      • setStationId

        public void setStationId​(int newStationId)
      • getSeq

        public int getSeq()
      • setSeq

        public void setSeq​(int newSeq)
      • setDuration

        public void setDuration​(int newDuration)
      • setNextSpeed

        public void setNextSpeed​(int newNextSpeed)
      • setArriveTime

        public void setArriveTime​(int newArriveTime)
      • setDepartTime

        public void setDepartTime​(int newDepartTime)
      • setStopNotes

        public void setStopNotes​(java.lang.String newNotes)
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object