Class UserClass

  • All Implemented Interfaces:
    Comparable<Idable>, ExternalIdable, Idable

    public class UserClass
    extends Object
    implements ExternalIdable
    A user class defines a combination of one or more characteristics of users in an aggregate representation of traffic which partially dictate how they behave in traffic assignment.
    Author:
    markr
    • Constructor Detail

      • UserClass

        public UserClass​(IdGroupingToken groupId,
                         String name,
                         Mode mode,
                         TravelerType travelerType)
        Constructor of user class
        Parameters:
        groupId - contiguous id generation within this group for instances of this class
        name - name of this user class
        mode - the mode of travel
        travelerType - the travelerType
    • Method Detail

      • getTravelerType

        public TravelerType getTravelerType()
        Get the traveler type of this user class
        Returns:
        TravelerType of this user class
      • getId

        public long getId()
        Get the id of this user class
        Specified by:
        getId in interface Idable
        Returns:
        id of this user class
      • getName

        public String getName()
        Get the name of this user class
        Returns:
        the name of this user class
      • getMode

        public Mode getMode()
        Return the mode of travel of this user class
        Returns:
        Mode of this user class
      • 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