The IDE generates the required equals and hashcode.
必要な equals メソッドと hashCode メソッドが IDE によって生成されます。 - NetBeans
In the dialog that appears, select the fields you want to base your equals and hashCode methods on and click OK. 表示されるダイアログで、equals メソッドと hashCode メソッドの基準にするフィールドを選択し、「了解」をクリックします。 - NetBeans
The next thing we need to do is to generate an Equals and Hashcodeusing Alt-Insert.
次に、Alt-Insert を使用して equals メソッドと hashCode メソッドを生成します。 - NetBeans