Record Class EventTreeResource.EventTree
java.lang.Object
java.lang.Record
ch.tocco.nice2.optional.event.impl.actions.eventtree.EventTreeResource.EventTree
- All Implemented Interfaces:
Serializable
- Enclosing class:
EventTreeResource
public static record EventTreeResource.EventTree(String key, int level, boolean selected, List<EventTreeResource.EventTree> children)
extends Record
implements Serializable
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidchildren()Returns the value of thechildrenrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.key()Returns the value of thekeyrecord component.intlevel()Returns the value of thelevelrecord component.booleanselected()Returns the value of theselectedrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
EventTree
-
EventTree
public EventTree(String key, int level, boolean selected, List<EventTreeResource.EventTree> children) Creates an instance of aEventTreerecord class.- Parameters:
key- the value for thekeyrecord componentlevel- the value for thelevelrecord componentselected- the value for theselectedrecord componentchildren- the value for thechildrenrecord component
-
-
Method Details
-
addChild
-
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 '=='. -
key
Returns the value of thekeyrecord component.- Returns:
- the value of the
keyrecord component
-
level
public int level()Returns the value of thelevelrecord component.- Returns:
- the value of the
levelrecord component
-
selected
public boolean selected()Returns the value of theselectedrecord component.- Returns:
- the value of the
selectedrecord component
-
children
Returns the value of thechildrenrecord component.- Returns:
- the value of the
childrenrecord component
-