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 tokenId,
                           String name,
                           double maxSpeed,
                           double pcu,
                           PhysicalModeFeaturesImpl physicalFeatures,
                           UsabilityModeFeaturesImpl usabilityFeatures)
        Constructor, using all defaults for non-provided parameters
        Parameters:
        tokenId - 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
      • ModeImpl

        protected ModeImpl​(ModeImpl other,
                           boolean deepCopy)
        Copy constructor
        Parameters:
        other - to copy
        deepCopy - when true, create a deep copy, shallow copy otherwise
    • Method Detail

      • generateId

        protected static long generateId​(IdGroupingToken tokenId)
        Generate id for this instance
        Parameters:
        tokenId - to use
        Returns:
        generated id
      • recreateManagedIds

        public long recreateManagedIds​(IdGroupingToken tokenId)
        recreate the internal id(s) and set them including the Idable id
        Specified by:
        recreateManagedIds in interface ManagedId
        Parameters:
        tokenId - to use (may be null in case managed id entity does not rely on token to recreate its managed id(s))
        Returns:
        the updated internal id
      • 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
      • deepClone

        public ModeImpl deepClone()
        An id entity should always support a deep copy, i.e., all "owned" members will be deep copied when a clone of this instance is created via this call. To be used with caution if not called by managed id container related code
        Specified by:
        deepClone in interface IdAble
        Overrides:
        deepClone in class ExternalIdAbleImpl
        Returns:
        deep copy of entity