Record Class PlotSetting<T>
java.lang.Object
java.lang.Record
org.opentrafficsim.animation.graphs.PlotSetting<T>
- Type Parameters:
T- value type- Record Components:
values- valuesdefaultValueIndex- default value index
Convenience record to define UI setting options.
Copyright (c) 2026-2026 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.
- Author:
- Wouter Schakel
-
Constructor Summary
ConstructorsConstructorDescriptionPlotSetting(ImmutableList<T> values, int defaultValueIndex) Creates an instance of aPlotSettingrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the value of thedefaultValueIndexrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.values()Returns the value of thevaluesrecord component.
-
Constructor Details
-
PlotSetting
Creates an instance of aPlotSettingrecord class.- Parameters:
values- the value for thevaluesrecord componentdefaultValueIndex- the value for thedefaultValueIndexrecord 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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
values
Returns the value of thevaluesrecord component.- Returns:
- the value of the
valuesrecord component
-
defaultValueIndex
public int defaultValueIndex()Returns the value of thedefaultValueIndexrecord component.- Returns:
- the value of the
defaultValueIndexrecord component
-