Record Class PerceivedGtu.Signals.Record
java.lang.Object
java.lang.Record
org.opentrafficsim.road.gtu.perception.object.PerceivedGtu.Signals.Record
- Record Components:
getTurnIndicatorStatus- the indicator statusisBrakingLightsOn- whether the braking lights are on
- All Implemented Interfaces:
PerceivedGtu.Signals
- Enclosing interface:
- PerceivedGtu.Signals
public static record PerceivedGtu.Signals.Record(TurnIndicatorStatus getTurnIndicatorStatus, boolean isBrakingLightsOn)
extends Record
implements PerceivedGtu.Signals
Record storing signals information.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.opentrafficsim.road.gtu.perception.object.PerceivedGtu.Signals
PerceivedGtu.Signals.Record -
Field Summary
Fields inherited from interface org.opentrafficsim.road.gtu.perception.object.PerceivedGtu.Signals
NONE -
Constructor Summary
ConstructorsConstructorDescriptionRecord(TurnIndicatorStatus getTurnIndicatorStatus, boolean isBrakingLightsOn) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.Returns the value of thegetTurnIndicatorStatusrecord component.final inthashCode()Returns a hash code value for this object.booleanReturns the value of theisBrakingLightsOnrecord component.final StringtoString()Returns a string representation of this record class.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.opentrafficsim.road.gtu.perception.object.PerceivedGtu.Signals
isIndicatorOn
-
Constructor Details
-
Record
Constructor.- Parameters:
getTurnIndicatorStatus- the indicator statusisBrakingLightsOn- whether the braking lights are on- Throws:
NullPointerException- when getTurnIndicatorStatus isnull
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
getTurnIndicatorStatus
Returns the value of thegetTurnIndicatorStatusrecord component.- Specified by:
getTurnIndicatorStatusin interfacePerceivedGtu.Signals- Returns:
- the value of the
getTurnIndicatorStatusrecord component
-
isBrakingLightsOn
public boolean isBrakingLightsOn()Returns the value of theisBrakingLightsOnrecord component.- Specified by:
isBrakingLightsOnin interfacePerceivedGtu.Signals- Returns:
- the value of the
isBrakingLightsOnrecord component
-