Class AccessGroupPropertiesFactory


  • public class AccessGroupPropertiesFactory
    extends Object
    Create Mode specific access properties to be used on macroscopic link segment types
    Author:
    markr
    • Constructor Detail

      • AccessGroupPropertiesFactory

        public AccessGroupPropertiesFactory()
    • Method Detail

      • create

        public static AccessGroupProperties create​(double maxSpeedKmH,
                                                   double criticalSpeedKmH,
                                                   Mode... accessModes)
        Factory method
        Parameters:
        maxSpeedKmH - maximum speed for this mode in this context
        criticalSpeedKmH - critical speed for this mode in this context
        accessModes - these properties relate to
        Returns:
        created properties
      • create

        public static AccessGroupProperties create​(double maxSpeedKmH,
                                                   double criticalSpeedKmH,
                                                   Collection<Mode> accessModes)
        Factory method
        Parameters:
        maxSpeedKmH - maximum speed for this mode in this context
        criticalSpeedKmH - critical speed for this mode in this context
        accessModes - these properties relate to
        Returns:
        created properties
      • create

        public static AccessGroupProperties create​(double maxSpeedKmH,
                                                   Mode... accessModes)
        Factory method adopting default value for critical speed
        Parameters:
        maxSpeedKmH - maximum speed for this mode in this context
        accessModes - these properties relate to
        Returns:
        created properties
      • create

        public static AccessGroupProperties create​(double maxSpeedKmH,
                                                   Collection<Mode> accessModes)
        Factory method adopting saem value for maximum and critical speed
        Parameters:
        maxSpeedKmH - maximum speed for this mode in this context
        accessModes - these properties relate to
        Returns:
        created properties
      • create

        public static AccessGroupProperties create​(Mode... accessModes)
        Factory method allowing access for given modes without any further specification on their speeds
        Parameters:
        accessModes - these properties relate to
        Returns:
        created properties
      • create

        public static AccessGroupProperties create​(Collection<Mode> accessModes)
        Factory method allowing access for given modes without any further specification on their speeds
        Parameters:
        accessModes - these properties relate to
        Returns:
        created properties
      • createOnLinkSegmentType

        public static void createOnLinkSegmentType​(MacroscopicLinkSegmentType linkSegmentType,
                                                   double maxSpeedKmH,
                                                   Collection<Mode> modesToAdd)
        Add mode properties for the passed in modes to the passed in link segment type where we cap the max and critical speed based on the minimum of the mode's maximum speed and the maximum speed
        Parameters:
        linkSegmentType - to populate for
        modesToAdd - to add
        maxSpeedKmH - maxSpeed to set
      • createOnLinkSegmentType

        public static void createOnLinkSegmentType​(MacroscopicLinkSegmentType linkSegmentType,
                                                   Mode modeToAdd,
                                                   double maxSpeedKmH)
        Add access properties for the passed in modes to the passed in link segment type where we cap the max and critical speed based on the minimum of the mode's maximum speed and the maximum speed
        Parameters:
        linkSegmentType - to populate for
        modeToAdd - to add
        maxSpeedKmH - maxSpeed to set, if exceeding mode maximum speed, only access for the mode is registered as the provided speed is not a restriction compared to the physical restriction