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 StringDEFAULT_XML_IDIf no mode is defined the default mode is assumed to have an XML id of 1static doubleGLOBAL_DEFAULT_MAXIMUM_SPEED_KMHDefault max speed in km/hstatic doubleGLOBAL_DEFAULT_PCUDefault pcu in pcustatic Class<Mode>MODE_ID_CLASSid 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.doublegetMaximumSpeedKmH()maximum speed for this modeStringgetName()Name of this modedoublegetPcu()Passenger car unit conversion factor for this modePhysicalModeFeaturesgetPhysicalFeatures()collect the physical features of this modedefault PredefinedModeTypegetPredefinedModeType()collect the predefined mode typeUsabilityModeFeaturesgetUseFeatures()collect the features of how this mode is used (public, private etc.)default booleanhasName()Verify if mode has a namedefault booleanhasPhysicalFeatures()Verify if physical features are availabledefault booleanhasUseFeatures()Verify if use features are availabledefault booleanisPredefinedModeType()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:
getIdClassin 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
-
-