Record Class TreeBuilder.NodeWithDepth<T>
java.lang.Object
java.lang.Record
cloud.opencode.base.tree.TreeBuilder.NodeWithDepth<T>
- Type Parameters:
T- the data type | 数据类型- Record Components:
data- the data | 数据depth- the depth | 深度
- Enclosing class:
TreeBuilder
Node with depth info
带深度信息的节点
- Since:
- JDK 25, opencode-base-tree V1.0.0
- Author:
- Leon Soo www.LeonSoo.com
-
Constructor Summary
ConstructorsConstructorDescriptionNodeWithDepth(T data, int depth) Creates an instance of aNodeWithDepthrecord class. -
Method Summary
Modifier and TypeMethodDescriptiondata()Returns the value of thedatarecord component.intdepth()Returns the value of thedepthrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
NodeWithDepth
-
-
Method Details
-
toString
-
hashCode
-
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 thecomparemethod from their corresponding wrapper classes. -
data
-
depth
-