G
- GTU typeI
- infrastructure typepublic interface Compatibility<G extends HierarchicalType<G>,I extends HierarchicalType<I>>
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 | Method and Description |
---|---|
LongitudinalDirectionality |
getDirectionality(G gtuType,
boolean tryParentsOfGTUType)
Retrieve the allowed driving directions for a GTUType.
|
Boolean |
isCompatible(G gtuType,
GTUDirectionality directionality)
Test if a GTUType can travel over the infrastructure.
|
Boolean isCompatible(G gtuType, GTUDirectionality directionality)
gtuType
- G; the type of the GTUdirectionality
- GTUDirectionality; the direction of the GTU with respect to the design direction of the
infrastructureisCompatible
on a higher level in the infrastructure hierarchyLongitudinalDirectionality getDirectionality(G gtuType, boolean tryParentsOfGTUType)
tryParentsOfGTUType
. tryParentsOfGTUType
is false, the value null is returned. If true; the parent of the GTUType is used and
the search is repeated, etc. If none of the parents of the GTUType yields a result, this method returns
LongitudinalDirectionality.DIR_NONE
.gtuType
- G; type of the GTUtryParentsOfGTUType
- boolean; if true; the parents of the GTUType are tried if no match was found for the given
GTUTypeLongitudinalDirectionality.DIR_NONE
if neither the GTUType or any of its parents specifies a
directionalityCopyright © 2014–2019 Delft University of Technology. All rights reserved.