boolean (Object obj) { if (!(obj instanceof KeyboardShortcut second)) { return false; } return Comparing.equal(myFirstKeyStroke, second.myFirstKeyStroke) && Comparing.equal(mySecondKeyStroke, second.mySecondKeyStroke); }