Class GeneratorPositions.LaneBiases
java.lang.Object
org.opentrafficsim.road.gtu.generator.GeneratorPositions.LaneBiases
- Enclosing class:
- GeneratorPositions
public static final class GeneratorPositions.LaneBiases
extends java.lang.Object
Set of lane biases per GTU type.
Copyright (c) 2013-2020 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.
- Version:
- $Revision$, $LastChangedDate$, by $Author$, initial version 24 dec. 2017
- Author:
- Alexander Verbraeck, Peter Knoppers, Wouter Schakel
-
Constructor Summary
Constructors Constructor Description LaneBiases() -
Method Summary
Modifier and Type Method Description GeneratorPositions.LaneBiasesaddBias(GTUType gtuType, GeneratorPositions.LaneBias bias)Adds a GTU bias for randomly drawing a lane.booleancontains(GTUType gtuType)Whether a bias is defined for the given type.GeneratorPositions.LaneBiasgetBias(GTUType gtuType)Returns the bias of given GTU type, orBias.Noneif none defined for the GTU type.java.lang.StringtoString()
-
Constructor Details
-
LaneBiases
public LaneBiases()
-
-
Method Details
-
addBias
Adds a GTU bias for randomly drawing a lane.- Parameters:
gtuType- GTUType; gtu typebias- LaneBias; bias- Returns:
- LaneBiases; lane biases for method chaining
-
contains
Whether a bias is defined for the given type.- Parameters:
gtuType- GTUType; GTU type- Returns:
- whether a bias is defined for the given type
-
getBias
Returns the bias of given GTU type, orBias.Noneif none defined for the GTU type.- Parameters:
gtuType- GTUType; GTU type- Returns:
- Bias; bias of the GTU type
-
toString
public java.lang.String toString()- Overrides:
toStringin classjava.lang.Object
-