From 642dad3f0c13a8a900aac21fe26e1eb672fbb5a6 Mon Sep 17 00:00:00 2001
From: Reinier Zwitserloot @Data(staticConstructor="of") class Foo<T> { private T x;}
you can create new instances of Foo
by writing: Foo.of(5);
instead of having to write: new Foo<Integer>(5);
.
Arrays are 'deep' compared/printed/hashCoded, which means that arrays that contain themselves will result in StackOverflowError
s. However,
@@ -49,7 +63,7 @@
You may safely presume that the hashCode implementation used will not change between versions of lombok, however this guarantee is not set in stone;
if there's a significant performance improvement to be gained from using an alternate hash algorithm, that will be substituted in a future version.
- For a general idea of how lombok generated the equals
, hashCode
, and toString
methods, check the example below.
+ For a general idea of how lombok generated the equals
, hashCode
, and toString
methods, check the example after.
For the purposes of equality, 2 NaN
(not a number) values for floats and doubles are considered equal, eventhough 'NaN == NaN' would
return false. This is analogous to java.lang.Double
's equals method, and is in fact required to ensure that comparing an object
@@ -57,19 +71,8 @@