Package org.planit.path.choice
Class PathChoiceBuilder<T extends PathChoice>
- java.lang.Object
-
- org.planit.utils.builder.Builder<T>
-
- org.planit.assignment.TrafficComponentBuilder<T>
-
- org.planit.path.choice.PathChoiceBuilder<T>
-
- Direct Known Subclasses:
StochasticPathChoiceBuilder
public abstract class PathChoiceBuilder<T extends PathChoice> extends TrafficComponentBuilder<T>
All path choice instances are built using this or a derived version of this builder- Author:
- markr
-
-
Field Summary
Fields Modifier and Type Field Description protected static Logger
LOGGER
the logger-
Fields inherited from class org.planit.assignment.TrafficComponentBuilder
groupId
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
PathChoiceBuilder(Class<T> pathChoiceClass, IdGroupingToken projectToken, InputBuilderListener inputBuilderListener)
Constructor
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description T
build()
Build the path choiceprotected abstract void
buildSubComponents(T pathChoiceInstance)
call to build and configure all sub components of this builderprotected T
createPathChoiceInstance()
Factory method to create the instance of the desired type-
Methods inherited from class org.planit.assignment.TrafficComponentBuilder
getGroupIdToken, getInputBuilderListener
-
Methods inherited from class org.planit.utils.builder.Builder
createConfigurator, getClassToBuild, getConfigurator
-
-
-
-
Field Detail
-
LOGGER
protected static final Logger LOGGER
the logger
-
-
Constructor Detail
-
PathChoiceBuilder
protected PathChoiceBuilder(Class<T> pathChoiceClass, IdGroupingToken projectToken, InputBuilderListener inputBuilderListener) throws PlanItException
Constructor- Parameters:
pathChoiceClass
- class to buildprojectToken
- idGrouping tokeninputBuilderListener
- the input builder listener- Throws:
PlanItException
- thrown if error
-
-
Method Detail
-
createPathChoiceInstance
protected T createPathChoiceInstance() throws PlanItException
Factory method to create the instance of the desired type- Returns:
- instance of traffic assignment
- Throws:
PlanItException
- thrown when error
-
buildSubComponents
protected abstract void buildSubComponents(T pathChoiceInstance) throws PlanItException
call to build and configure all sub components of this builder- Parameters:
pathChoiceInstance
- to build sub components for- Throws:
PlanItException
- thrown if error
-
build
public T build() throws PlanItException
Build the path choice- Specified by:
build
in classBuilder<T extends PathChoice>
- Returns:
- path choice instance that is built
- Throws:
PlanItException
- thrown if error
-
-