Class BasicSpeedMatcher

    • Constructor Detail

      • BasicSpeedMatcher

        public BasicSpeedMatcher​(BasicSpeedMatcherConfig config)
        Constructs the abstract BasicSpeedMatcher at the core of any Basic Speed Matcher
        Parameters:
        config - BasicSpeedMatcherConfig
    • Method Detail

      • validate

        protected boolean validate()
        Validates the speed matcher's configuration
        Specified by:
        validate in class SpeedMatcher
        Returns:
        true if the configuration is valid, false otherwise
      • getSpeedForSpeedStep

        protected float getSpeedForSpeedStep​(SpeedMatcher.SpeedTableStep speedStep,
                                             float minSpeed,
                                             float maxSpeed)
        Gets the desired speed for a given speed step
        Parameters:
        speedStep - the SpeedTableStep to get the speed for
        minSpeed - minimum speed in KPH (at speed step 1)
        maxSpeed - maximum speed in KPH (at speed step 28)
        Returns:
        the speed for the given speed step in KPH