Package org.goplanit.path.choice
Class PathChoiceBuilder<T extends PathChoice>
- java.lang.Object
-
- org.goplanit.utils.builder.Builder<T>
-
- org.goplanit.component.PlanitComponentBuilder<T>
-
- org.goplanit.path.choice.PathChoiceBuilder<T>
-
- Direct Known Subclasses:
StochasticPathChoiceBuilder
public abstract class PathChoiceBuilder<T extends PathChoice> extends PlanitComponentBuilder<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 LoggerLOGGERthe logger-
Fields inherited from class org.goplanit.component.PlanitComponentBuilder
groupId
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedPathChoiceBuilder(Class<T> pathChoiceClass, IdGroupingToken projectToken, InputBuilderListener inputBuilderListener)Constructor
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description Tbuild()Build the path choiceprotected abstract voidbuildSubComponents(T pathChoiceInstance)call to build and configure all sub components of this builderprotected TcreatePathChoiceInstance()Factory method to create the instance of the desired type-
Methods inherited from class org.goplanit.component.PlanitComponentBuilder
getGroupIdToken, getInputBuilderListener
-
Methods inherited from class org.goplanit.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:
buildin classBuilder<T extends PathChoice>- Returns:
- path choice instance that is built
- Throws:
PlanItException- thrown if error
-
-