Record Class TestGtuData
java.lang.Object
java.lang.Record
org.opentrafficsim.kpi.sampling.impl.TestGtuData
- Record Components:
getId- idgetOriginId- origin idgetDestinationId- destination idgetGtuTypeId- GTU type idgetRouteId- route idgetReferenceSpeed- reference speed
- All Implemented Interfaces:
Identifiable,GtuData
public record TestGtuData(String getId, String getOriginId, String getDestinationId, String getGtuTypeId, String getRouteId, Speed getReferenceSpeed)
extends Record
implements GtuData
Test GtuData class.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.Returns the value of thegetDestinationIdrecord component.Returns the value of thegetGtuTypeIdrecord component.getId()Returns the value of thegetIdrecord component.Returns the value of thegetOriginIdrecord component.Returns the value of thegetReferenceSpeedrecord component.Returns the value of thegetRouteIdrecord component.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
TestGtuData
public TestGtuData(String getId, String getOriginId, String getDestinationId, String getGtuTypeId, String getRouteId, Speed getReferenceSpeed) Creates an instance of aTestGtuDatarecord class.- Parameters:
getId- the value for thegetIdrecord componentgetOriginId- the value for thegetOriginIdrecord componentgetDestinationId- the value for thegetDestinationIdrecord componentgetGtuTypeId- the value for thegetGtuTypeIdrecord componentgetRouteId- the value for thegetRouteIdrecord componentgetReferenceSpeed- the value for thegetReferenceSpeedrecord 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). -
getId
Returns the value of thegetIdrecord component.- Specified by:
getIdin interfaceIdentifiable- Returns:
- the value of the
getIdrecord component
-
getOriginId
Returns the value of thegetOriginIdrecord component.- Specified by:
getOriginIdin interfaceGtuData- Returns:
- the value of the
getOriginIdrecord component
-
getDestinationId
Returns the value of thegetDestinationIdrecord component.- Specified by:
getDestinationIdin interfaceGtuData- Returns:
- the value of the
getDestinationIdrecord component
-
getGtuTypeId
Returns the value of thegetGtuTypeIdrecord component.- Specified by:
getGtuTypeIdin interfaceGtuData- Returns:
- the value of the
getGtuTypeIdrecord component
-
getRouteId
Returns the value of thegetRouteIdrecord component.- Specified by:
getRouteIdin interfaceGtuData- Returns:
- the value of the
getRouteIdrecord component
-
getReferenceSpeed
Returns the value of thegetReferenceSpeedrecord component.- Specified by:
getReferenceSpeedin interfaceGtuData- Returns:
- the value of the
getReferenceSpeedrecord component
-