Package org.planit.network.physical
Interface PhysicalNetworkBuilder
-
- All Known Implementing Classes:
MacroscopicNetworkBuilder
public interface PhysicalNetworkBuilderBuild network elements based on chosen network view. Implementations are registered on the network class which uses it to construct network elements- Author:
- markr
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description LinkcreateLink(Node nodeA, Node nodeB, double length, String name)Create a new link instanceLinkSegmentcreateLinkSegment(Link parentLink, boolean directionAB)Create a new physical link segment instanceModecreateMode(long externalModeId, String name, double pcu)Create a new modeNodecreateNode()Create a new node instanceIdGroupingTokengetIdGroupingToken()Collect the id grouping token used by this buildervoidsetIdGroupingToken(IdGroupingToken groupId)Each builder needs a group if token to allow all underlying factory methods to generated ids uniquely tied to the group the entities belong to
-
-
-
Method Detail
-
createNode
Node createNode()
Create a new node instance- Returns:
- created node
-
createMode
Mode createMode(long externalModeId, String name, double pcu)
Create a new mode- Parameters:
pcu- pcu value of the modename- name of the modeexternalModeId- external id of the mode- Returns:
- created mode
-
createLink
Link createLink(Node nodeA, Node nodeB, double length, String name) throws PlanItException
Create a new link instance- Parameters:
nodeA- the first node in this linknodeB- the second node in this linklength- the length of this linkname- the name of the link- Returns:
- created link
- Throws:
PlanItException- thrown if there is an error
-
createLinkSegment
LinkSegment createLinkSegment(Link parentLink, boolean directionAB)
Create a new physical link segment instance- Parameters:
parentLink- the parent link of the link segmentdirectionAB- direction of travel- Returns:
- linkSegment the created link segment
-
setIdGroupingToken
void setIdGroupingToken(IdGroupingToken groupId)
Each builder needs a group if token to allow all underlying factory methods to generated ids uniquely tied to the group the entities belong to- Parameters:
groupId- , contiguous id generation within this group for instances created with the factory methods
-
getIdGroupingToken
IdGroupingToken getIdGroupingToken()
Collect the id grouping token used by this builder- Returns:
- idGroupingToken the id grouping token used by this builder
-
-