Class PerceivedObjectBase
java.lang.Object
org.opentrafficsim.road.gtu.lane.perception.object.PerceivedObjectBase
- All Implemented Interfaces:
Comparable<PerceivedObject>,Identifiable,PerceivedObject
- Direct Known Subclasses:
PerceivedDistance,PerceivedGtuSimple,PerceivedLaneBasedObjectBase
Base class for perceived objects which stores the information.
Copyright (c) 2013-2024 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.
- Author:
- Alexander Verbraeck, Peter Knoppers, Wouter Schakel
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.opentrafficsim.road.gtu.lane.perception.object.PerceivedObject
PerceivedObject.Kinematics, PerceivedObject.ObjectType -
Constructor Summary
ConstructorsConstructorDescriptionPerceivedObjectBase(String id, PerceivedObject.ObjectType objectType, Length length, PerceivedObject.Kinematics kinematics) Constructor. -
Method Summary
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.opentrafficsim.road.gtu.lane.perception.object.PerceivedObject
compareTo, getAcceleration, getDistance, getSpeed
-
Constructor Details
-
PerceivedObjectBase
public PerceivedObjectBase(String id, PerceivedObject.ObjectType objectType, Length length, PerceivedObject.Kinematics kinematics) Constructor.- Parameters:
id- object idobjectType- object typelength- length of the objectkinematics- kinematics of the object- Throws:
NullPointerException- when any input argument isnull
-
-
Method Details
-
getId
- Specified by:
getIdin interfaceIdentifiable
-
getObjectType
Description copied from interface:PerceivedObjectReturns object type.- Specified by:
getObjectTypein interfacePerceivedObject- Returns:
- the (perceived) object Type
-
getLength
Description copied from interface:PerceivedObjectReturns length.- Specified by:
getLengthin interfacePerceivedObject- Returns:
- the length of the other object
-
getKinematics
Description copied from interface:PerceivedObjectReturns information on the kinematics of the perceived object. This includes position, speed, acceleration and overlap.- Specified by:
getKinematicsin interfacePerceivedObject- Returns:
- information on the kinematics of the perceived object
-
hashCode
public int hashCode() -
equals
-
toString
-