Package org.planit.network.physical
Class ModeImpl
- java.lang.Object
-
- org.planit.network.physical.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 Summary
Constructors Constructor Description ModeImpl(IdGroupingToken groupId, Object externalId, String name, double pcu)ConstructorModeImpl(IdGroupingToken groupId, String name, double pcu)Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompareTo(Mode o)Compare based on idObjectgetExternalId()Return the external id of this modelonggetId()Return id of this instance.StringgetName()Name of this modedoublegetPcu()Passenger car unit conversion factor for this modebooleanhasExternalId()Returns whether this mode has an external Id set
-
-
-
Constructor Detail
-
ModeImpl
public ModeImpl(IdGroupingToken groupId, String name, double pcu)
Constructor- Parameters:
groupId- , contiguous id generation within this group for instances of this classname- the name of this modepcu- 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 classexternalId- the externalId of this modename- the name of this modepcu- the PCU value of this mode
-
-
Method Detail
-
getPcu
public double getPcu()
Description copied from interface:ModePassenger car unit conversion factor for this mode
-
getId
public long getId()
Description copied from interface:ModeReturn id of this instance. This id is expected to be generated using the org.planit.utils.misc.IdGenerator
-
getExternalId
public Object getExternalId()
Description copied from interface:ModeReturn the external id of this mode- Specified by:
getExternalIdin interfaceMode- Returns:
- externalId of this mode
-
hasExternalId
public boolean hasExternalId()
Description copied from interface:ModeReturns whether this mode has an external Id set- Specified by:
hasExternalIdin interfaceMode- Returns:
- true if external Id set, false otherwise
-
compareTo
public int compareTo(Mode o)
Compare based on id- Specified by:
compareToin interfaceComparable<Mode>- See Also:
Comparable.compareTo(java.lang.Object)
-
-