/** * This instance is equal to all instances of {@code ModifiableFooBarBaz} that have equal attribute values. * An uninitialized instance is equal only to itself. * @return {@code true} if {@code this} is equal to {@code another} instance */ @Override public boolean equals(@Nullable Object another) { if (this == another) return true; if (!(another instanceof ModifiableFooBarBaz)) return false; ModifiableFooBarBaz other = (ModifiableFooBarBaz) another; if (!isInitialized() || !other.isInitialized()) { return false; } return equalTo(other); }