Closed derjust closed 9 years ago
The equals
implementations can definitely be cleaned up with ObjectUtil.equals
. See MediaData.equals
for reference.
Oh, it looks like you removed ObjectUtil. Why was that?
I think those equals
methods are easier to debug and have those quick-checks at the beginning (different class or same object) which make them "better".
But that is for sure a very subjective opinion. Happy to use your ObjectUtils approach (any reason to use that as it looks like it is also part of Dravik: https://developer.android.com/reference/java/util/Objects.html ?)
I was unaware of the Objects
class. Yes, please make use of it! +1
We will optimize when performance becomes an issue in practice. For now, let's keep the code clean.
Please review whenever it fits.
Followed old concept of ObjectUtil
but replaced it with its counterpart from JDK1.7 / Dravik doing the exact same code.
(And rebased to most recent master
)
hashCode() and equals() method for all data containers as per #11