Package introspector
Record Class IntrospectorCompareTreesWriteHtmlTest.Person
java.lang.Object
java.lang.Record
introspector.IntrospectorCompareTreesWriteHtmlTest.Person
- Enclosing class:
IntrospectorCompareTreesWriteHtmlTest
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionanything()Returns the value of theanythingrecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of thefirstNamerecord component.final inthashCode()Returns a hash code value for this object.intid()Returns the value of theidrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
id
private final int idThe field for theidrecord component. -
firstName
The field for thefirstNamerecord component. -
anything
The field for theanythingrecord component.
-
-
Constructor Details
-
Person
Creates an instance of aPersonrecord class.- Parameters:
id- the value for theidrecord componentfirstName- the value for thefirstNamerecord componentanything- the value for theanythingrecord 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 '=='. -
id
public int id()Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
firstName
Returns the value of thefirstNamerecord component.- Returns:
- the value of the
firstNamerecord component
-
anything
Returns the value of theanythingrecord component.- Returns:
- the value of the
anythingrecord component
-