Generate Overrides for equals(), hashCode() and toString()

We can generate the code to override the equals and hashCode methods.

You can use ⌘N (macOS) / Alt+Insert (Windows/Linux) for the Generate menu and then select equals() and hashCode(). You can also use the same shortcut again and select toString() to override that method as well.


Related Resources

Convert Class to Record
Convert Class to Record
Use inspections to convert classes to Java 16 records.
Create New Class
Create New Class
Quickly add new classes to your project.
Extend Selection
Extend Selection
Extend and shrink your current code selection.