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, List<EventTreeResource.EventTree> children)
extends Record
implements Serializable
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
children()
Returns the value of thechildren
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.key()
Returns the value of thekey
record component.int
level()
Returns the value of thelevel
record component.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
EventTree
-
EventTree
Creates an instance of aEventTree
record class.- Parameters:
key
- the value for thekey
record componentlevel
- the value for thelevel
record componentchildren
- the value for thechildren
record 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 thekey
record component.- Returns:
- the value of the
key
record component
-
level
public int level()Returns the value of thelevel
record component.- Returns:
- the value of the
level
record component
-
children
Returns the value of thechildren
record component.- Returns:
- the value of the
children
record component
-