From f1124aad02569c983cb8979445245141bf029a88 Mon Sep 17 00:00:00 2001
From: Reinier Zwitserloot @EqualsAndHashCode to let lombok generate implementations of the
equals(Object other) and hashCode() methods. By default, it'll use all non-static, non-transient
fields, but you can exclude more fields by naming them in the optional exclude parameter to the annotation.
+ Alternatively, you can specify exactly which fields you wish to be used by naming them in the of parameter.
By setting callSuper to true, you can include the equals and hashCode methods of your superclass in the generated methods.
For hashCode, the result of super.hashCode() is included in the hash algorithm, and for equals, the generated method will return
@@ -65,6 +66,10 @@
Attempting to exclude fields that don't exist or would have been excluded anyway (because they are static or transient) results in warnings on the named fields. You therefore don't have to worry about typos. +
+ Having both exclude and of generates a warning; the exclude parameter will be ignored in that case.
+
+ By default, any variables that start with a $ symbol are excluded automatically. You can only include them by using the 'of' parameter.
-- cgit