Class ModeImpl

  • All Implemented Interfaces:
    Comparable<Mode>, Mode

    public class ModeImpl
    extends Object
    implements Mode
    A Mode is a user class feature representing a single form of transport (car, truck etc.).
    Author:
    markr
    • Constructor Detail

      • ModeImpl

        public ModeImpl​(IdGroupingToken groupId,
                        String name,
                        double pcu)
        Constructor
        Parameters:
        groupId - , contiguous id generation within this group for instances of this class
        name - the name of this mode
        pcu - the PCU value of this mode
      • ModeImpl

        public ModeImpl​(IdGroupingToken groupId,
                        Object externalId,
                        String name,
                        double pcu)
        Constructor
        Parameters:
        groupId - , contiguous id generation within this group for instances of this class
        externalId - the externalId of this mode
        name - the name of this mode
        pcu - the PCU value of this mode
    • Method Detail

      • getPcu

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

        public String getName()
        Description copied from interface: Mode
        Name of this mode
        Specified by:
        getName in interface Mode
        Returns:
        the name
      • getId

        public long getId()
        Description copied from interface: Mode
        Return id of this instance. This id is expected to be generated using the org.planit.utils.misc.IdGenerator
        Specified by:
        getId in interface Mode
        Returns:
        unique id
      • getExternalId

        public Object getExternalId()
        Description copied from interface: Mode
        Return the external id of this mode
        Specified by:
        getExternalId in interface Mode
        Returns:
        externalId of this mode
      • hasExternalId

        public boolean hasExternalId()
        Description copied from interface: Mode
        Returns whether this mode has an external Id set
        Specified by:
        hasExternalId in interface Mode
        Returns:
        true if external Id set, false otherwise