Package org.opentrafficsim.editor
Record Class ScenarioWrapper
java.lang.Object
java.lang.Record
org.opentrafficsim.editor.ScenarioWrapper
- Record Components:
scenarioNode- node of the scenario
Wraps a scenario node as an item in the dropdown menu.
Copyright (c) 2023-2024 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
ConstructorsConstructorDescriptionScenarioWrapper(XsdTreeNode scenarioNode) Creates an instance of aScenarioWrapperrecord 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.booleanisScenario(XsdTreeNode node) Returns whether this wraps the given node.Returns the scenario node.toString()Returns a string representation of this record class.
-
Constructor Details
-
ScenarioWrapper
Creates an instance of aScenarioWrapperrecord class.- Parameters:
scenarioNode- the value for thescenarioNoderecord component
-
-
Method Details
-
isScenario
Returns whether this wraps the given node.- Parameters:
node- node.- Returns:
- whether this wraps the given node.
-
scenarioNode
Returns the scenario node.- Returns:
- scenario node.
-
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).
-