Class ModeImpl

    • Field Detail

      • DEFAULT_EXTERNAL_ID

        public static final Long DEFAULT_EXTERNAL_ID
    • Constructor Detail

      • ModeImpl

        protected ModeImpl​(IdGroupingToken groupId,
                           double maxSpeed,
                           String name,
                           double pcu)
        Constructor, using all defaults for non-provided parameters
        Parameters:
        groupId - , contiguous id generation within this group for instances of this class
        name - the name of this mode
        maxSpeed - this mode takes on
        pcu - the PCU value of this mode
      • ModeImpl

        protected ModeImpl​(IdGroupingToken groupId,
                           String name,
                           double maxSpeed,
                           double pcu,
                           PhysicalModeFeatures physicalFeatures,
                           UsabilityModeFeatures usabilityFeatures)
        Constructor, using all defaults for non-provided parameters
        Parameters:
        groupId - , contiguous id generation within this group for instances of this class
        name - the name of this mode
        maxSpeed - this mode takes on
        pcu - the PCU value of this mode
        physicalFeatures - physical features of the mode
        usabilityFeatures - usability features of the mode
    • Method Detail

      • getId

        public long getId()
        collect id of the entity
        Specified by:
        getId in interface Idable
        Returns:
        id
      • setExternalId

        public void setExternalId​(String externalId)
        set the external id
        Specified by:
        setExternalId in interface ExternalIdable
        Parameters:
        externalId - to set
      • getXmlId

        public String getXmlId()
        the id exposed to users as the "normal" id in the PLANit native xml format
        Specified by:
        getXmlId in interface ExternalIdable
        Returns:
        xmlId
      • setXmlId

        public void setXmlId​(String xmlId)
        set the external id
        Specified by:
        setXmlId in interface ExternalIdable
        Parameters:
        xmlId - to set
      • hasExternalId

        public boolean hasExternalId()
        check if external id is available or not
        Specified by:
        hasExternalId in interface ExternalIdable
        Returns:
        true when nont null, false otherwise
      • getName

        public String getName()
        Name of this mode
        Specified by:
        getName in interface Mode
        Returns:
        the name
      • getMaximumSpeedKmH

        public double getMaximumSpeedKmH()
        maximum speed for this mode
        Specified by:
        getMaximumSpeedKmH in interface Mode
        Returns:
        maximum speed
      • getPcu

        public double getPcu()
        Passenger car unit conversion factor for this mode
        Specified by:
        getPcu in interface Mode
        Returns:
        pcu
      • getUseFeatures

        public final UsabilityModeFeatures getUseFeatures()
        collect the features of how this mode is used (public, private etc.)
        Specified by:
        getUseFeatures in interface Mode
        Returns:
        the use features of this mode
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object