Package org.planit.userclass
Class UserClass
- java.lang.Object
-
- org.planit.userclass.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
-
-
Field Summary
Fields Modifier and Type Field Description static String
DEFAULT_NAME
default namestatic String
DEFAULT_XML_ID
Default external id
-
Constructor Summary
Constructors Constructor Description UserClass(IdGroupingToken groupId, String name, Mode mode, TravelerType travelerType)
Constructor of user class
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getExternalId()
get external id of the entitylong
getId()
Get the id of this user classMode
getMode()
Return the mode of travel of this user classString
getName()
Get the name of this user classTravelerType
getTravelerType()
Get the traveler type of this user classString
getXmlId()
the id exposed to users as the "normal" id in the PLANit native xml formatvoid
setExternalId(String externalId)
set the external idvoid
setXmlId(String xmlId)
set the external id-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.planit.utils.id.ExternalIdable
hasExternalId, hasXmlId
-
Methods inherited from interface org.planit.utils.id.Idable
compareTo, idEquals, idHashCode
-
-
-
-
Field Detail
-
DEFAULT_NAME
public static final String DEFAULT_NAME
default name- See Also:
- Constant Field Values
-
DEFAULT_XML_ID
public static final String DEFAULT_XML_ID
Default external id- See Also:
- Constant Field Values
-
-
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 classname
- name of this user classmode
- the mode of traveltravelerType
- 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
-
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
-
getExternalId
public String getExternalId()
get external id of the entity- Specified by:
getExternalId
in interfaceExternalIdable
- Returns:
- external id
-
setExternalId
public void setExternalId(String externalId)
set the external id- Specified by:
setExternalId
in interfaceExternalIdable
- 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 interfaceExternalIdable
- Returns:
- xmlId
-
setXmlId
public void setXmlId(String xmlId)
set the external id- Specified by:
setXmlId
in interfaceExternalIdable
- Parameters:
xmlId
- to set
-
-