Package org.goplanit.utils.mode
Interface Mode
-
- All Superinterfaces:
Cloneable
,Comparable<IdAble>
,ExternalIdAble
,IdAble
,ManagedId
- All Known Subinterfaces:
PredefinedMode
- All Known Implementing Classes:
BicycleMode
,BusMode
,CarHighOccupancyMode
,CarMode
,CarShareMode
,GoodsMode
,HeavyGoodsMode
,LargeHeavyGoodsMode
,LightRailMode
,ModeImpl
,MotorBikeMode
,PedestrianMode
,PredefinedModeImpl
,SubwayMode
,TrainMode
,TramMode
public interface Mode extends ExternalIdAble, ManagedId
Interface to represent a mode- Author:
- markr
-
-
Field Summary
Fields Modifier and Type Field Description static String
DEFAULT_XML_ID
If no mode is defined the default mode is assumed to have an XML id of 1static double
GLOBAL_DEFAULT_MAXIMUM_SPEED_KMH
Default max speed in km/hstatic double
GLOBAL_DEFAULT_PCU
Default pcu in pcustatic Class<Mode>
MODE_ID_CLASS
id class for generating ids
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default Class<Mode>
getIdClass()
Each managed id class is expected to generate its ids based on its class signature.double
getMaximumSpeedKmH()
maximum speed for this modeString
getName()
Name of this modedouble
getPcu()
Passenger car unit conversion factor for this modePhysicalModeFeatures
getPhysicalFeatures()
collect the physical features of this modedefault PredefinedModeType
getPredefinedModeType()
collect the predefined mode typeUsabilityModeFeatures
getUseFeatures()
collect the features of how this mode is used (public, private etc.)default boolean
hasName()
Verify if mode has a namedefault boolean
hasPhysicalFeatures()
Verify if physical features are availabledefault boolean
hasUseFeatures()
Verify if use features are availabledefault boolean
isPredefinedModeType()
check if the mode is one of the PLANit predefined mode types or not-
Methods inherited from interface org.goplanit.utils.id.ExternalIdAble
getExternalId, getXmlId, hasExternalId, hasXmlId, setExternalId, setXmlId
-
Methods inherited from interface org.goplanit.utils.id.IdAble
clone, compareTo, getId, idEquals, idHashCode
-
Methods inherited from interface org.goplanit.utils.id.ManagedId
recreateManagedIds, resetChildManagedIdEntities
-
-
-
-
Field Detail
-
GLOBAL_DEFAULT_MAXIMUM_SPEED_KMH
static final double GLOBAL_DEFAULT_MAXIMUM_SPEED_KMH
Default max speed in km/h- See Also:
- Constant Field Values
-
GLOBAL_DEFAULT_PCU
static final double GLOBAL_DEFAULT_PCU
Default pcu in pcu- See Also:
- Constant Field Values
-
DEFAULT_XML_ID
static final String DEFAULT_XML_ID
If no mode is defined the default mode is assumed to have an XML id of 1- See Also:
- Constant Field Values
-
-
Method Detail
-
getPcu
double getPcu()
Passenger car unit conversion factor for this mode- Returns:
- pcu
-
getPhysicalFeatures
PhysicalModeFeatures getPhysicalFeatures()
collect the physical features of this mode- Returns:
- the physical mode features
-
getUseFeatures
UsabilityModeFeatures getUseFeatures()
collect the features of how this mode is used (public, private etc.)- Returns:
- the use features of this mode
-
getName
String getName()
Name of this mode- Returns:
- the name
-
getMaximumSpeedKmH
double getMaximumSpeedKmH()
maximum speed for this mode- Returns:
- maximum speed
-
getIdClass
default Class<Mode> getIdClass()
Each managed id class is expected to generate its ids based on its class signature. To be able to generate the correct id the class used for id generation is to be provided via this method call.- Specified by:
getIdClass
in interfaceManagedId
- Returns:
- idClass to use for generating ids for instances of this idable derived class
-
hasPhysicalFeatures
default boolean hasPhysicalFeatures()
Verify if physical features are available- Returns:
- true if available, false otherwise
-
hasUseFeatures
default boolean hasUseFeatures()
Verify if use features are available- Returns:
- true if available, false otherwise
-
isPredefinedModeType
default boolean isPredefinedModeType()
check if the mode is one of the PLANit predefined mode types or not- Returns:
- true when predefined, false, when custom
-
getPredefinedModeType
default PredefinedModeType getPredefinedModeType()
collect the predefined mode type- Returns:
- the type, set to CUSTOM when it is not one of the regular predefined modes
-
hasName
default boolean hasName()
Verify if mode has a name- Returns:
- true when present, false otherwise
-
-