public final class GTUType extends HierarchicalType<GTUType> implements Serializable
Copyright (c) 2013-2019 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.
Modifier and Type | Class and Description |
---|---|
static class |
GTUType.DEFAULTS
Default types with their name.
|
Constructor and Description |
---|
GTUType(String id,
GTUType parent) |
GTUType(String id,
Network network) |
Modifier and Type | Method and Description |
---|---|
static GTUCharacteristics |
defaultCharacteristics(GTUType gtuType,
Network network,
StreamInterface randomStream)
Returns default characteristics for given GTUType.
|
Network |
getNetwork() |
boolean |
isOfType(GTUType.DEFAULTS type)
Whether this, or any of the parent types, equals the given type.
|
boolean |
isType(GTUType.DEFAULTS type)
Whether this equals the given type.
|
String |
toString() |
commonAncestor, equals, getId, getParent, hashCode, isOfType
public GTUType(String id, Network network) throws NullPointerException
id
- String; The id of the GTUType to make it identifiable.network
- Network; The network to which the GTUType belongsNullPointerException
- if the id is nullpublic GTUType(String id, GTUType parent) throws NullPointerException
id
- String; The id of the GTUType to make it identifiable.parent
- GTUType; parent GTU typeNullPointerException
- if the id is nullpublic boolean isOfType(GTUType.DEFAULTS type)
type
- DEFAULTS; typepublic boolean isType(GTUType.DEFAULTS type)
type
- DEFAULTS; typepublic static GTUCharacteristics defaultCharacteristics(GTUType gtuType, Network network, StreamInterface randomStream) throws GTUException
gtuType
- GTUType; GTUType GTU typenetwork
- Network; the network to use as a keyrandomStream
- StreamInterface; stream for random numbersGTUException
- if there are no default characteristics for the GTU typepublic Network getNetwork()
Copyright © 2014–2019 Delft University of Technology. All rights reserved.