Package introspector.model.traverse
Record Class TreeSerializerMock.TraverseDTO
java.lang.Object
java.lang.Record
introspector.model.traverse.TreeSerializerMock.TraverseDTO
- Enclosing class:
TreeSerializerMock
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final intThe field for thedepthrecord component.private final booleanThe field for thehasBeenVisitedrecord component.private final NodeThe field for thenoderecord component. -
Constructor Summary
ConstructorsConstructorDescriptionTraverseDTO(Node node, int depth, boolean hasBeenVisited) Creates an instance of aTraverseDTOrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintdepth()Returns the value of thedepthrecord component.final booleanIndicates whether some other object is "equal to" this one.booleanReturns the value of thehasBeenVisitedrecord component.final inthashCode()Returns a hash code value for this object.node()Returns the value of thenoderecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
node
The field for thenoderecord component. -
depth
private final int depthThe field for thedepthrecord component. -
hasBeenVisited
private final boolean hasBeenVisitedThe field for thehasBeenVisitedrecord component.
-
-
Constructor Details
-
TraverseDTO
TraverseDTO(Node node, int depth, boolean hasBeenVisited) Creates an instance of aTraverseDTOrecord class.- Parameters:
node- the value for thenoderecord componentdepth- the value for thedepthrecord componenthasBeenVisited- the value for thehasBeenVisitedrecord 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 '=='. -
node
Returns the value of thenoderecord component.- Returns:
- the value of the
noderecord component
-
depth
public int depth()Returns the value of thedepthrecord component.- Returns:
- the value of the
depthrecord component
-
hasBeenVisited
public boolean hasBeenVisited()Returns the value of thehasBeenVisitedrecord component.- Returns:
- the value of the
hasBeenVisitedrecord component
-