Record Class ReportingLine
java.lang.Object
java.lang.Record
com.tnsai.coordination.groups.hierarchy.ReportingLine
- Record Components:
parentId- supervisor agent IDchildId- subordinate agent ID
Represents a parent-child reporting relationship in a hierarchy.
-
Constructor Summary
ConstructorsConstructorDescriptionReportingLine(String parentId, String childId) Creates a ReportingLine with validation. -
Method Summary
Modifier and TypeMethodDescriptionchildId()Returns the value of thechildIdrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.parentId()Returns the value of theparentIdrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ReportingLine
Creates a ReportingLine with validation.
-
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
parentId
Returns the value of theparentIdrecord component.- Returns:
- the value of the
parentIdrecord component
-
childId
Returns the value of thechildIdrecord component.- Returns:
- the value of the
childIdrecord component
-