Package org.opentrafficsim.editor
Record Class XsdOption
java.lang.Object
java.lang.Record
org.opentrafficsim.editor.XsdOption
- Record Components:
optionNode- XsdTreeNode; option node.choice- XsdTreeNode; choice node, the option node is one of its options.firstInGroup- boolean; whether this option is first in a group and a separator might be shown in a menu.selected- boolean; whether this option is currently selected.
public record XsdOption(XsdTreeNode optionNode, XsdTreeNode choice, boolean firstInGroup, boolean selected)
extends Record
Class that groups some information on an option for a choice node, relevant to show to the user.
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
ConstructorsConstructorDescriptionXsdOption(XsdTreeNode optionNode, XsdTreeNode choice, boolean firstInGroup, boolean selected) Creates an instance of aXsdOptionrecord class. -
Method Summary
Modifier and TypeMethodDescriptionchoice()Returns the value of thechoicerecord component.final booleanIndicates whether some other object is "equal to" this one.booleanReturns the value of thefirstInGrouprecord component.final inthashCode()Returns a hash code value for this object.Returns the value of theoptionNoderecord component.booleanselected()Returns the value of theselectedrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
XsdOption
public XsdOption(XsdTreeNode optionNode, XsdTreeNode choice, boolean firstInGroup, boolean selected) Creates an instance of aXsdOptionrecord class.- Parameters:
optionNode- the value for theoptionNoderecord componentchoice- the value for thechoicerecord componentfirstInGroup- the value for thefirstInGrouprecord componentselected- the value for theselectedrecord 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 '=='. -
optionNode
Returns the value of theoptionNoderecord component.- Returns:
- the value of the
optionNoderecord component
-
choice
Returns the value of thechoicerecord component.- Returns:
- the value of the
choicerecord component
-
firstInGroup
public boolean firstInGroup()Returns the value of thefirstInGrouprecord component.- Returns:
- the value of the
firstInGrouprecord component
-
selected
public boolean selected()Returns the value of theselectedrecord component.- Returns:
- the value of the
selectedrecord component
-