G - GTU typeP - perception typepublic abstract class AbstractPerceptionCategory<G extends GTU,P extends Perception<G>> extends Type<AbstractPerceptionCategory<G,P>> implements Serializable, PerceptionCategory<G,P>
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.
| Constructor and Description |
|---|
AbstractPerceptionCategory(P perception)
Constructor setting the perception.
|
| Modifier and Type | Method and Description |
|---|---|
G |
getGtu()
Returns the connected GTU.
|
protected <T> T |
getObjectOrNull(TimeStampedObject<T> object)
Returns the object inside a time stamped object, or
null if it's null. |
P |
getPerception()
Returns the connected perception.
|
Time |
getTimestamp()
Returns the current time.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitupdateAllpublic AbstractPerceptionCategory(P perception)
perception - P; perceptionpublic P getPerception()
public G getGtu() throws GTUException
GTUException - if the GTU has not been initializedpublic final Time getTimestamp() throws GTUException
GTUException - if the GTU has not been initializedprotected final <T> T getObjectOrNull(TimeStampedObject<T> object)
null if it's null.T - type of time stamped objectobject - TimeStampedObject<T>; time stamped objectnull if it's nullCopyright © 2014–2019 Delft University of Technology. All rights reserved.