Package org.goplanit.mode
Class PredefinedModeImpl
- java.lang.Object
-
- org.goplanit.utils.id.IdAbleImpl
-
- org.goplanit.utils.id.ExternalIdAbleImpl
-
- org.goplanit.mode.ModeImpl
-
- org.goplanit.mode.PredefinedModeImpl
-
- All Implemented Interfaces:
Comparable<IdAble>,ExternalIdAble,IdAble,ManagedId,Mode,PredefinedMode
- Direct Known Subclasses:
BicycleMode,BusMode,CarHighOccupancyMode,CarMode,CarShareMode,FerryMode,GoodsMode,HeavyGoodsMode,LargeHeavyGoodsMode,LightRailMode,MotorBikeMode,PedestrianMode,SubwayMode,TrainMode,TramMode
public class PredefinedModeImpl extends ModeImpl implements PredefinedMode
A mode that has predefined fixed values so it can easily be understood, or mapped- Author:
- markr
-
-
Field Summary
-
Fields inherited from class org.goplanit.mode.ModeImpl
DEFAULT_EXTERNAL_ID
-
Fields inherited from interface org.goplanit.utils.mode.Mode
DEFAULT_XML_ID, GLOBAL_DEFAULT_MAXIMUM_SPEED_KMH, GLOBAL_DEFAULT_PCU, MODE_ID_CLASS
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedPredefinedModeImpl(PredefinedModeImpl other, boolean deepCopy)Copy constructorprotectedPredefinedModeImpl(IdGroupingToken groupId, PredefinedModeType modeType, double maxSpeed, double pcu, PhysicalModeFeatures physicalFeatures, UsabilityModeFeatures usabilityFeatures)A predefined mode
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PredefinedModeImpldeepClone()An id entity should always support a deep copy, i.e., all "owned" members will be deep copied when a clone of this instance is created via this call.PredefinedModeTypegetPredefinedModeType()Collect the predefined mode type of this modePredefinedModeImplshallowClone()Create a shallow copy of this entityStringtoString()-
Methods inherited from class org.goplanit.mode.ModeImpl
generateId, getMaximumSpeedKmH, getName, getPcu, getPhysicalFeatures, getUseFeatures, recreateManagedIds
-
Methods inherited from class org.goplanit.utils.id.ExternalIdAbleImpl
getExternalId, getXmlId, setExternalId, setXmlId
-
Methods inherited from class org.goplanit.utils.id.IdAbleImpl
equals, generateAndSetId, generateId, getId, hashCode, setId
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.goplanit.utils.id.ExternalIdAble
appendExternalId, appendExternalId, getExternalId, getIdsAsString, getSplitExternalId, getSplitExternalId, getXmlId, hasExternalId, hasXmlId, setExternalId, setXmlId, setXmlId
-
Methods inherited from interface org.goplanit.utils.id.IdAble
compareTo, getId, idEquals, idHashCode
-
Methods inherited from interface org.goplanit.utils.id.ManagedId
recreateManagedIds, resetChildManagedIdEntities
-
Methods inherited from interface org.goplanit.utils.mode.Mode
containsExternalId, getIdClass, getMaximumSpeedKmH, getName, getPcu, getPhysicalFeatures, getUseFeatures, hasName, hasPhysicalFeatures, hasUseFeatures
-
Methods inherited from interface org.goplanit.utils.mode.PredefinedMode
isPredefinedModeType
-
-
-
-
Constructor Detail
-
PredefinedModeImpl
protected PredefinedModeImpl(IdGroupingToken groupId, PredefinedModeType modeType, double maxSpeed, double pcu, PhysicalModeFeatures physicalFeatures, UsabilityModeFeatures usabilityFeatures)
A predefined mode- Parameters:
groupId- groupId for id generationmodeType- predefined mode type usedmaxSpeed- the maximum speed for this predefined mode typepcu- pcu value for this predefined modephysicalFeatures- physical features of the modeusabilityFeatures- usabilitu features of the mode
-
PredefinedModeImpl
protected PredefinedModeImpl(PredefinedModeImpl other, boolean deepCopy)
Copy constructor- Parameters:
other- to copydeepCopy- when true, create a deep copy, shallow copy otherwise
-
-
Method Detail
-
getPredefinedModeType
public PredefinedModeType getPredefinedModeType()
Collect the predefined mode type of this mode- Specified by:
getPredefinedModeTypein interfaceMode- Returns:
- predefined mode type
-
shallowClone
public PredefinedModeImpl shallowClone()
Create a shallow copy of this entity- Specified by:
shallowClonein interfaceIdAble- Overrides:
shallowClonein classModeImpl- Returns:
- shallow copy of entity
-
deepClone
public PredefinedModeImpl deepClone()
An id entity should always support a deep copy, i.e., all "owned" members will be deep copied when a clone of this instance is created via this call. To be used with caution if not called by managed id container related code
-
-