boolean (Object obj) { if (!(obj instanceof Descriptor descriptor)) return false; return myShortName.equals(descriptor.myShortName) && myLevel.equals(descriptor.getLevel()) && myEnabled == descriptor.isEnabled() && myState.equalTo(descriptor.getState()); }