Record Class NeighborTriplet
java.lang.Object
java.lang.Record
org.opentrafficsim.road.gtu.perception.categories.neighbors.NeighborTriplet
- Record Components:
headway- headwayspeed- speedacceleration- acceleration
public record NeighborTriplet(org.djunits.value.vdouble.scalar.Length headway, org.djunits.value.vdouble.scalar.Speed speed, org.djunits.value.vdouble.scalar.Acceleration acceleration)
extends Record
Results from anticipation.
Copyright (c) 2013-2026 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
-
Constructor Summary
ConstructorsConstructorDescriptionNeighborTriplet(org.djunits.value.vdouble.scalar.Length headway, org.djunits.value.vdouble.scalar.Speed speed, org.djunits.value.vdouble.scalar.Acceleration acceleration) Creates an instance of aNeighborTripletrecord class. -
Method Summary
Modifier and TypeMethodDescriptionorg.djunits.value.vdouble.scalar.AccelerationReturns the value of theaccelerationrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.org.djunits.value.vdouble.scalar.Lengthheadway()Returns the value of theheadwayrecord component.org.djunits.value.vdouble.scalar.Speedspeed()Returns the value of thespeedrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
NeighborTriplet
public NeighborTriplet(org.djunits.value.vdouble.scalar.Length headway, org.djunits.value.vdouble.scalar.Speed speed, org.djunits.value.vdouble.scalar.Acceleration acceleration) Creates an instance of aNeighborTripletrecord class.- Parameters:
headway- the value for theheadwayrecord componentspeed- the value for thespeedrecord componentacceleration- the value for theaccelerationrecord component
-
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
headway
public org.djunits.value.vdouble.scalar.Length headway()Returns the value of theheadwayrecord component.- Returns:
- the value of the
headwayrecord component
-
speed
public org.djunits.value.vdouble.scalar.Speed speed()Returns the value of thespeedrecord component.- Returns:
- the value of the
speedrecord component
-
acceleration
public org.djunits.value.vdouble.scalar.Acceleration acceleration()Returns the value of theaccelerationrecord component.- Returns:
- the value of the
accelerationrecord component
-