public abstract class AbstractSensor extends Object implements Sensor
Copyright (c) 2013-2015 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.
$LastChangedDate: 2015-07-26 01:01:13 +0200 (Sun, 26 Jul 2015) $, @version $Revision: 1155 $, by $Author: averbraeck $,
initial version Dec 31, 2014
| Constructor and Description |
|---|
AbstractSensor(Lane<?,?> lane,
DoubleScalar.Rel<LengthUnit> longitudinalPosition,
RelativePosition.TYPE positionType,
String name) |
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(Sensor o) |
boolean |
equals(Object obj) |
Lane<?,?> |
getLane() |
DoubleScalar.Rel<LengthUnit> |
getLongitudinalPosition() |
double |
getLongitudinalPositionSI() |
String |
getName() |
RelativePosition.TYPE |
getPositionType() |
int |
hashCode() |
public AbstractSensor(Lane<?,?> lane, DoubleScalar.Rel<LengthUnit> longitudinalPosition, RelativePosition.TYPE positionType, String name)
lane - The lane for which this is a sensor.longitudinalPosition - DoubleScalar.Rel<LengthUnit>; the position (between 0.0 and the length of the Lane) of
the sensor on the design line of the lane.positionType - RelativePosition.TYPE; the relative position type (e.g., FRONT, BACK) of the vehicle that triggers
the sensor.name - the name of the sensor.public final Lane<?,?> getLane()
public final DoubleScalar.Rel<LengthUnit> getLongitudinalPosition()
getLongitudinalPosition in interface Sensorpublic final RelativePosition.TYPE getPositionType()
getPositionType in interface Sensorpublic final double getLongitudinalPositionSI()
getLongitudinalPositionSI in interface Sensorpublic int compareTo(Sensor o)
compareTo in interface Comparable<Sensor>Copyright © 2014–2015 Delft University of Technology. All rights reserved.