You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Define abstract value type
@Value.Immutable
public interface ValueObject {
String name();
List<Integer> counts();
Optional<String> description();
}
Can I specify that I don't want counts to be taken into account in generated toString() method?
Best regards,
Martin
PS: I know I can convert the interface to an abstract class, but it collides with some of our custom-made tooling that supposes that immutables are always interfaces.
The text was updated successfully, but these errors were encountered:
@MartyIX thank you for asking this! @datval 's suggestion is the best way to handle your situation (@Value.Redacted). We're thinking of also adding general capability for interfaces to specify ("underwrite") equals / hashCode / toString as it is possible with abstract classes (maybe defining special static methods in interfaces), but we're not there yet (#739)
Hi,
Let's say I have the following interface:
Can I specify that I don't want
counts
to be taken into account in generatedtoString()
method?Best regards,
Martin
PS: I know I can convert the interface to an abstract class, but it collides with some of our custom-made tooling that supposes that immutables are always interfaces.
The text was updated successfully, but these errors were encountered: