public class LaneType extends org.opentrafficsim.base.HierarchicalType<LaneType> implements Serializable, org.opentrafficsim.core.compatibility.Compatibility<org.opentrafficsim.core.gtu.GTUType,LaneType>
Copyright (c) 2013-2017 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.
$LastChangedDate: 2015-08-30 00:16:51 +0200 (Sun, 30 Aug 2015) $, @version $Revision: 1329 $, by $Author: averbraeck $,
initial version Aug 21, 2014
| Modifier and Type | Field and Description |
|---|---|
static LaneType |
BICYCLE_PATH
Bicycle path (Dutch: fietspad).
|
static LaneType |
BUS_LANE
Bidirectional bus lane (Dutch: busstrook).
|
static LaneType |
FOOTPATH
Bidirectional footpath (Dutch: voetpad).
|
static LaneType |
FREEWAY
Controlled access roads (Dutch: snelweg).
|
static LaneType |
HIGHWAY
High speed vehicular roads (Dutch: autoweg).
|
static LaneType |
MOPED_PATH
Bidirectional bicycle lane (Dutch: (brom)fietspad).
|
static LaneType |
NONE
The lane type used for lanes that are forbidden to all GTU types.
|
static LaneType |
ONE_WAY_LANE
Vehicular lane that is two-way for PEDESTRIANS but only permitted in design direction for all other road users.
|
static LaneType |
RESIDENTIAL_ROAD_LANE
Residential vehicular roads (Dutch: woonerf).
|
static LaneType |
RURAL_ROAD_LANE
Lane on rural vehicular roads (Dutch: weg buiten bebouwde kom).
|
static LaneType |
TWO_WAY_LANE
Vehicular roads (Dutch: weg); allows all road vehicles and pedestrians.
|
static LaneType |
URBAN_ROAD_LANE
Lane on urban vehicular roads (Dutch: weg binnen bebouwde kom).
|
| Constructor and Description |
|---|
LaneType(String id,
LaneType parent,
org.opentrafficsim.core.compatibility.GTUCompatibility<LaneType> compatibility)
Create a new Lane type with a compatibility set.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addGtuCompatability(org.opentrafficsim.core.gtu.GTUType gtuType,
org.opentrafficsim.core.network.LongitudinalDirectionality direction)
Add GTU type to compatibility.
|
boolean |
equals(Object obj) |
org.opentrafficsim.core.network.LongitudinalDirectionality |
getDirectionality(org.opentrafficsim.core.gtu.GTUType gtuType)
Get the permitted driving directions for a given GTU type on this Lane.
|
org.opentrafficsim.core.network.LongitudinalDirectionality |
getDirectionality(org.opentrafficsim.core.gtu.GTUType gtuType,
boolean tryParentsOfGTUType) |
int |
hashCode() |
LaneType |
inv()
Construct a new Lane type based on another Lane type with longitudinally inverted compatibility.
|
Boolean |
isCompatible(org.opentrafficsim.core.gtu.GTUType gtuType,
org.opentrafficsim.core.gtu.GTUDirectionality direction)
Compatibility is solely determined by a specific lane type, and independent of compatibility in super or sub types.
|
String |
toString() |
public static final LaneType NONE
public static final LaneType TWO_WAY_LANE
public static final LaneType ONE_WAY_LANE
public static final LaneType FREEWAY
public static final LaneType HIGHWAY
public static final LaneType RURAL_ROAD_LANE
public static final LaneType URBAN_ROAD_LANE
public static final LaneType RESIDENTIAL_ROAD_LANE
public static final LaneType BUS_LANE
public static final LaneType MOPED_PATH
public static final LaneType BICYCLE_PATH
public static final LaneType FOOTPATH
public LaneType(String id, LaneType parent, org.opentrafficsim.core.compatibility.GTUCompatibility<LaneType> compatibility) throws NullPointerException
id - the id of the lane type.parent - parent typecompatibility - the collection of compatible GTUTypes for this LaneType. Compatibility is solely determined by a
specific lane type, and independent of compatibility in super or sub types.NullPointerException - if either the id is null, or the compatibilitySet is nullpublic final LaneType inv()
public final Boolean isCompatible(org.opentrafficsim.core.gtu.GTUType gtuType, org.opentrafficsim.core.gtu.GTUDirectionality direction)
isCompatible in interface org.opentrafficsim.core.compatibility.Compatibility<org.opentrafficsim.core.gtu.GTUType,LaneType>gtuType - GTU type to look for compatibility.direction - GTUDirectionality; the direction that the GTU is moving (with respect to the direction of the design
line of the Link)public final org.opentrafficsim.core.network.LongitudinalDirectionality getDirectionality(org.opentrafficsim.core.gtu.GTUType gtuType)
gtuType - GTUType; the GTU typepublic final void addGtuCompatability(org.opentrafficsim.core.gtu.GTUType gtuType,
org.opentrafficsim.core.network.LongitudinalDirectionality direction)
gtuType - GTUType; the GTU type to adddirection - LongitudinalDirectionality; permitted direction of movementpublic int hashCode()
hashCode in class org.opentrafficsim.base.HierarchicalType<LaneType>public boolean equals(Object obj)
equals in class org.opentrafficsim.base.HierarchicalType<LaneType>public final org.opentrafficsim.core.network.LongitudinalDirectionality getDirectionality(org.opentrafficsim.core.gtu.GTUType gtuType,
boolean tryParentsOfGTUType)
getDirectionality in interface org.opentrafficsim.core.compatibility.Compatibility<org.opentrafficsim.core.gtu.GTUType,LaneType>Copyright © 2014–2018 Delft University of Technology. All rights reserved.