Class Delay


  • public class Delay
    extends Object
    Used for create temporary delays at specific station for a specific duration

    Delay class diagram

    • Constructor Summary

      Constructors 
      Constructor Description
      Delay​(float startDate, float endDate, int transitionNb, float delay)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      float getDelay()
      get the value of the delay
      float getEndDate()
      get the end date the delay will be effective
      float getStartDate()
      get the start date the delay will be effective
      int getTransitionNb()
      get the number of the transition on which the delay will be effective
      boolean isValid()
      used in RPN.RPNConfig.manageDelays() to check if the delay is valid depending on the current date and the start/end dates of the delay
      void setDelay​(float delay)
      set the value of the delay
      void setEndDate​(float endDate)
      set the end date the delay will be effective
      void setStartDate​(float startDate)
      set the start date the delay will be effective
      void setTransition​(int transitionNb)
      set the number of the transition on which the delay will be effective
      void setValid​(boolean valid)
      used in RPN.RPNConfig.manageDelays() to set a delay validity to false or true depending on the current date and the start/end dates of the delay, this prevent from adding the delay multiple times and help to remove it once the current date has overlapped the end date of the delay
    • Constructor Detail

      • Delay

        public Delay​(float startDate,
                     float endDate,
                     int transitionNb,
                     float delay)
    • Method Detail

      • getStartDate

        public float getStartDate()
        get the start date the delay will be effective
      • setStartDate

        public void setStartDate​(float startDate)
        set the start date the delay will be effective
      • getEndDate

        public float getEndDate()
        get the end date the delay will be effective
      • setEndDate

        public void setEndDate​(float endDate)
        set the end date the delay will be effective
      • getTransitionNb

        public int getTransitionNb()
        get the number of the transition on which the delay will be effective
      • setTransition

        public void setTransition​(int transitionNb)
        set the number of the transition on which the delay will be effective
      • getDelay

        public float getDelay()
        get the value of the delay
      • setDelay

        public void setDelay​(float delay)
        set the value of the delay
      • isValid

        public boolean isValid()
        used in RPN.RPNConfig.manageDelays() to check if the delay is valid depending on the current date and the start/end dates of the delay
      • setValid

        public void setValid​(boolean valid)
        used in RPN.RPNConfig.manageDelays() to set a delay validity to false or true depending on the current date and the start/end dates of the delay, this prevent from adding the delay multiple times and help to remove it once the current date has overlapped the end date of the delay