Package org.opentrafficsim.draw.graphs
Record Class OffsetTrajectory.TrajectorySection
java.lang.Object
java.lang.Record
org.opentrafficsim.draw.graphs.OffsetTrajectory.TrajectorySection
- Record Components:
trajectory- trajectorysection- section index in trajectory
- Enclosing class:
- OffsetTrajectory
public static record OffsetTrajectory.TrajectorySection(OffsetTrajectory trajectory, Integer section)
extends Record
Section in trajectory for which a color is required.
-
Constructor Summary
ConstructorsConstructorDescriptionTrajectorySection(OffsetTrajectory trajectory, Integer section) Creates an instance of aTrajectorySectionrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.section()Returns the value of thesectionrecord component.final StringtoString()Returns a string representation of this record class.Returns the value of thetrajectoryrecord component.
-
Constructor Details
-
TrajectorySection
Creates an instance of aTrajectorySectionrecord class.- Parameters:
trajectory- the value for thetrajectoryrecord componentsection- the value for thesectionrecord 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). -
trajectory
Returns the value of thetrajectoryrecord component.- Returns:
- the value of the
trajectoryrecord component
-
section
Returns the value of thesectionrecord component.- Returns:
- the value of the
sectionrecord component
-