Skip to content
Branch: master
Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


Demo of Item 10 from EffectiveJava 3/E.

All objects must obey general contract when overriding equals. AutoValue from Google saves the programmer from writing custom equals and hashCode implementations. IDEs can generate implementations, but they're fragile -- and not future-proof. AutoValue annotation is a smarter approach, therefore.


  • all the value objects are immutable.
  • in Cake, since flour and bakingPowder are required properties, the only way to build a cake is by supplying these properties to Builder.


  1. AutoValue introduction:
  2. AutoValue Builder:
You can’t perform that action at this time.