Commit 56a37328 authored by Brian Duff's avatar Brian Duff Committed by Max Cai
Browse files

Implement hashCode() and equals() behind a generator option.

The option is only called 'generate_equals' because:
- equals() is the main thing; hashCode() is there only to
  complement equals();
- it's shorter;
- toString() should not be included in this option because
  it's more for debugging and it's more likely to stop
  ProGuard from working well.

Also shortened the "has bit" expression; was
((bitField & mask) == mask), now ((bitField & mask) != 0).
Both the Java code and the bytecode are slightly shorter.

Change-Id: Ic309a08a60883bf454eb6612679aa99611620e76
parent 461d4ac8
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment