Class AbstractHeadwayLaneBasedObject
- java.lang.Object
-
- org.opentrafficsim.road.gtu.lane.perception.headway.AbstractHeadway
-
- org.opentrafficsim.road.gtu.lane.perception.headway.AbstractHeadwayCopy
-
- org.opentrafficsim.road.gtu.lane.perception.headway.AbstractHeadwayLaneBasedObject
-
- All Implemented Interfaces:
Serializable
,Comparable<Headway>
,Identifiable
,PerceivedObject
,Headway
,HeadwayLaneBasedObject
- Direct Known Subclasses:
HeadwayBusStop
,HeadwayConflict
,HeadwayStopLine
,HeadwayTrafficLight
public abstract class AbstractHeadwayLaneBasedObject extends AbstractHeadwayCopy implements HeadwayLaneBasedObject
Lane based object headway with constructors for stationary information.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 May 15, 2019
- Author:
- Alexander Verbraeck, Peter Knoppers, Wouter Schakel
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.opentrafficsim.road.gtu.lane.perception.headway.Headway
Headway.ObjectType
-
-
Constructor Summary
Constructors Constructor Description AbstractHeadwayLaneBasedObject(Headway.ObjectType objectType, String id, Length overlapFront, Length overlap, Length overlapRear, Length length, Lane lane)
Construct a new Headway information object, for a non-moving object parallel with us.AbstractHeadwayLaneBasedObject(Headway.ObjectType objectType, String id, Length overlapFront, Length overlap, Length overlapRear, Lane lane)
Construct a new Headway information object, for a non-moving object parallel with us.AbstractHeadwayLaneBasedObject(Headway.ObjectType objectType, String id, Length distance, Length length, Lane lane)
Construct a new Headway information object, for a non-moving object ahead of us or behind us.AbstractHeadwayLaneBasedObject(Headway.ObjectType objectType, String id, Length distance, Lane lane)
Construct a new Headway information object, for a non-moving object ahead of us or behind us.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Lane
getLane()
Lane at which the object is located.-
Methods inherited from class org.opentrafficsim.road.gtu.lane.perception.headway.AbstractHeadwayCopy
equals, getAcceleration, getId, getLength, getObjectType, getSpeed, hashCode
-
Methods inherited from class org.opentrafficsim.road.gtu.lane.perception.headway.AbstractHeadway
getDistance, getOverlap, getOverlapFront, getOverlapRear, isAhead, isBehind, isParallel, toString
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.opentrafficsim.road.gtu.lane.perception.headway.Headway
compareTo, getAcceleration, getDistance, getId, getLength, getObjectType, getOverlap, getOverlapFront, getOverlapRear, getSpeed, isAhead, isBehind, isParallel
-
-
-
-
Constructor Detail
-
AbstractHeadwayLaneBasedObject
public AbstractHeadwayLaneBasedObject(Headway.ObjectType objectType, String id, Length overlapFront, Length overlap, Length overlapRear, Length length, Lane lane) throws GTUException
Construct a new Headway information object, for a non-moving object parallel with us.- Parameters:
objectType
- ObjectType; the perceived object type, can be null if object type unknown.id
- String; the id of the object for comparison purposes, can not be null.overlapFront
- the front-front distance to the other object; if this constructor is used, this value cannot be null.overlap
- the 'center' overlap with the other object; if this constructor is used, this value cannot be null.overlapRear
- the rear-rear distance to the other object; if this constructor is used, this value cannot be null.length
- the length of the other object; if this constructor is used, length cannot be null.lane
- Lane; the lane.- Throws:
GTUException
- when id is null, or parameters are inconsistent
-
AbstractHeadwayLaneBasedObject
public AbstractHeadwayLaneBasedObject(Headway.ObjectType objectType, String id, Length overlapFront, Length overlap, Length overlapRear, Lane lane) throws GTUException
Construct a new Headway information object, for a non-moving object parallel with us.- Parameters:
objectType
- ObjectType; the perceived object type, can be null if object type unknown.id
- String; the id of the object for comparison purposes, can not be null.overlapFront
- the front-front distance to the other object; if this constructor is used, this value cannot be null.overlap
- the 'center' overlap with the other object; if this constructor is used, this value cannot be null.overlapRear
- the rear-rear distance to the other object; if this constructor is used, this value cannot be null.lane
- Lane; the lane.- Throws:
GTUException
- when id is null, or parameters are inconsistent
-
AbstractHeadwayLaneBasedObject
public AbstractHeadwayLaneBasedObject(Headway.ObjectType objectType, String id, Length distance, Length length, Lane lane) throws GTUException
Construct a new Headway information object, for a non-moving object ahead of us or behind us.- Parameters:
objectType
- ObjectType; the perceived object type, can be null if object type unknown.id
- String; the id of the object for comparison purposes, can not be null.distance
- the distance to the other object; if this constructor is used, distance cannot be null.length
- the length of the other object; if this constructor is used, length cannot be null.lane
- Lane; the lane.- Throws:
GTUException
- when id is null, or parameters are inconsistent
-
AbstractHeadwayLaneBasedObject
public AbstractHeadwayLaneBasedObject(Headway.ObjectType objectType, String id, Length distance, Lane lane) throws GTUException
Construct a new Headway information object, for a non-moving object ahead of us or behind us.- Parameters:
objectType
- ObjectType; the perceived object type, can be null if object type unknown.id
- String; the id of the object for comparison purposes, can not be null.distance
- the distance to the other object; if this constructor is used, distance cannot be null.lane
- Lane; the lane.- Throws:
GTUException
- when id is null, or parameters are inconsistent
-
-
Method Detail
-
getLane
public Lane getLane()
Lane at which the object is located.- Specified by:
getLane
in interfaceHeadwayLaneBasedObject
- Returns:
- Lane; lane at which the object is located
-
-