Package org.goplanit.zoning
Class UndirectedConnectoidImpl
- java.lang.Object
-
- org.goplanit.utils.id.IdAbleImpl
-
- org.goplanit.utils.id.ExternalIdAbleImpl
-
- org.goplanit.zoning.ConnectoidImpl
-
- org.goplanit.zoning.UndirectedConnectoidImpl
-
- All Implemented Interfaces:
Comparable<IdAble>,Iterable<Zone>,ExternalIdAble,IdAble,ManagedId,Connectoid,UndirectedConnectoid
public class UndirectedConnectoidImpl extends ConnectoidImpl implements UndirectedConnectoid
Undirected connectoid connecting one or more (transfer/OD) zone(s) to the physical road network, each connection will yield a connectoid edge and two connectoid segments when constructing the transport network internally based on the referenced node- Author:
- markr
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.goplanit.zoning.ConnectoidImpl
ConnectoidImpl.AccessZoneProperties
-
-
Field Summary
Fields Modifier and Type Field Description protected DirectedVertexaccessVertexthe access point to an infrastructure layerprotected longundirectedConnectoidIdunique id across undirected connectoids-
Fields inherited from class org.goplanit.zoning.ConnectoidImpl
accessZones, name, type
-
Fields inherited from interface org.goplanit.utils.zoning.Connectoid
CONNECTOID_ID_CLASS, DEFAULT_CONNECTOID_TYPE, DEFAULT_LENGTH_KM
-
Fields inherited from interface org.goplanit.utils.zoning.UndirectedConnectoid
UNDIRECTED_CONNECTOID_ID_CLASS
-
-
Constructor Summary
Constructors Modifier Constructor Description UndirectedConnectoidImpl(IdGroupingToken idToken, DirectedVertex accessVertex)ConstructorUndirectedConnectoidImpl(IdGroupingToken idToken, DirectedVertex accessVertex, Zone accessZone)ConstructorprotectedUndirectedConnectoidImpl(IdGroupingToken idToken, DirectedVertex accessVertex, Zone accessZone, double length)ConstructorprotectedUndirectedConnectoidImpl(UndirectedConnectoidImpl other, boolean deepCopy)Copy constructor
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description UndirectedConnectoidImpldeepClone()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.protected static longgenerateUndirectedConnectoidId(IdGroupingToken groupId)Generate undirected connectoid idDirectedVertexgetAccessVertex()collect the access vertex for this connectoidlonggetUndirectedConnectoidId()collect the undirected connectoid's unique idlongrecreateManagedIds(IdGroupingToken tokenId)recreate the internal id(s) and set them including the Idable idprotected voidsetAccessVertex(DirectedVertex accessVertex)Set the accessVertexprotected voidsetUndirectedConnectoidId(long undirectedConnectoidId)Set the undirected connectoid idUndirectedConnectoidImplshallowClone()Create a shallow copy of this entity-
Methods inherited from class org.goplanit.zoning.ConnectoidImpl
addAccessZone, addAllowedMode, generateId, getAccessZones, getExplicitlyAllowedModes, getFirstAccessZone, getLengthKm, getName, getNumberOfAccessZones, getType, hasAccessZone, isModeAllowed, iterator, recreateAccessZoneIdMapping, setId, setLength, setName, setType
-
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
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.goplanit.utils.zoning.Connectoid
addAccessZone, addAllAccessZones, addAllowedMode, addAllowedModes, addAllowedModes, getAccessZones, getExplicitlyAllowedModes, getFirstAccessZone, getIdClass, getLengthKm, getName, getNumberOfAccessZones, getType, hasAccessZone, hasAccessZones, hasExplicitlyAllowedModes, hasLength, hasName, isAllModesAllowed, isModeAllowed, setLength, setName, setType
-
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 java.lang.Iterable
forEach, iterator, spliterator
-
Methods inherited from interface org.goplanit.utils.id.ManagedId
resetChildManagedIdEntities
-
Methods inherited from interface org.goplanit.utils.zoning.UndirectedConnectoid
getUndirectedConnectoidIdClass
-
-
-
-
Field Detail
-
undirectedConnectoidId
protected long undirectedConnectoidId
unique id across undirected connectoids
-
accessVertex
protected DirectedVertex accessVertex
the access point to an infrastructure layer
-
-
Constructor Detail
-
UndirectedConnectoidImpl
protected UndirectedConnectoidImpl(IdGroupingToken idToken, DirectedVertex accessVertex, Zone accessZone, double length)
Constructor- Parameters:
idToken- contiguous id generation within this group for instances of this classaccessVertex- the node in the network (layer) the connectoid connects withaccessZone- for the connectoidlength- for the connection
-
UndirectedConnectoidImpl
public UndirectedConnectoidImpl(IdGroupingToken idToken, DirectedVertex accessVertex, Zone accessZone)
Constructor- Parameters:
idToken- contiguous id generation within this group for instances of this classaccessVertex- the node in the network (layer) the connectoid connects withaccessZone- for the connectoid
-
UndirectedConnectoidImpl
public UndirectedConnectoidImpl(IdGroupingToken idToken, DirectedVertex accessVertex)
Constructor- Parameters:
idToken- contiguous id generation within this group for instances of this classaccessVertex- the node in the network (layer) the connectoid connects with
-
UndirectedConnectoidImpl
protected UndirectedConnectoidImpl(UndirectedConnectoidImpl other, boolean deepCopy)
Copy constructor- Parameters:
other- to copydeepCopy- when true, create a eep copy, shallow copy otherwise
-
-
Method Detail
-
generateUndirectedConnectoidId
protected static long generateUndirectedConnectoidId(IdGroupingToken groupId)
Generate undirected connectoid id- Parameters:
groupId- contiguous id generation within this group for instances of this class- Returns:
- id of undirected connectoid
-
setUndirectedConnectoidId
protected void setUndirectedConnectoidId(long undirectedConnectoidId)
Set the undirected connectoid id- Parameters:
undirectedConnectoidId- to use
-
setAccessVertex
protected void setAccessVertex(DirectedVertex accessVertex)
Set the accessVertex- Parameters:
accessVertex- to use
-
getUndirectedConnectoidId
public long getUndirectedConnectoidId()
collect the undirected connectoid's unique id- Specified by:
getUndirectedConnectoidIdin interfaceUndirectedConnectoid- Returns:
- undirected connectoid id
-
getAccessVertex
public DirectedVertex getAccessVertex()
collect the access vertex for this connectoid- Specified by:
getAccessVertexin interfaceConnectoid- Returns:
- access vertex
-
recreateManagedIds
public long recreateManagedIds(IdGroupingToken tokenId)
recreate the internal id(s) and set them including the Idable id- Specified by:
recreateManagedIdsin interfaceManagedId- Overrides:
recreateManagedIdsin classConnectoidImpl- Parameters:
tokenId- to use (may be null in case managed id entity does not rely on token to recreate its managed id(s))- Returns:
- the updated internal id
-
shallowClone
public UndirectedConnectoidImpl shallowClone()
Create a shallow copy of this entity- Specified by:
shallowClonein interfaceConnectoid- Specified by:
shallowClonein interfaceIdAble- Specified by:
shallowClonein interfaceUndirectedConnectoid- Specified by:
shallowClonein classConnectoidImpl- Returns:
- shallow copy of entity
-
deepClone
public UndirectedConnectoidImpl 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- Specified by:
deepClonein interfaceConnectoid- Specified by:
deepClonein interfaceIdAble- Specified by:
deepClonein interfaceUndirectedConnectoid- Specified by:
deepClonein classConnectoidImpl- Returns:
- deep copy of entity
-
-