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
ConstructorDescriptionXsdOption
(XsdTreeNode optionNode, XsdTreeNode choice, boolean firstInGroup, boolean selected) Creates an instance of aXsdOption
record class. -
Method Summary
Modifier and TypeMethodDescriptionchoice()
Returns the value of thechoice
record component.final boolean
Indicates whether some other object is "equal to" this one.boolean
Returns the value of thefirstInGroup
record component.final int
hashCode()
Returns a hash code value for this object.Returns the value of theoptionNode
record component.boolean
selected()
Returns the value of theselected
record component.final String
toString()
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 aXsdOption
record class.- Parameters:
optionNode
- the value for theoptionNode
record componentchoice
- the value for thechoice
record componentfirstInGroup
- the value for thefirstInGroup
record componentselected
- the value for theselected
record 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 theoptionNode
record component.- Returns:
- the value of the
optionNode
record component
-
choice
Returns the value of thechoice
record component.- Returns:
- the value of the
choice
record component
-
firstInGroup
public boolean firstInGroup()Returns the value of thefirstInGroup
record component.- Returns:
- the value of the
firstInGroup
record component
-
selected
public boolean selected()Returns the value of theselected
record component.- Returns:
- the value of the
selected
record component
-