boolean (Object object) { if (object == this) return true; if (object instanceof ErrorStripe stripe) { return stripe.myLayer == myLayer && stripe.myColor.getRGB() == myColor.getRGB(); } return false; }