Objectify contains following features:
- ObjectEquality: Override
isEqual:andhashmethods with one line of code - ObjectDescription: Override
descriptionmethod with one line of code
@implementation Person
equality_properties(Person, firstName, lastName);
@endThe equality_properties macro will generate isEqual: and hash methods,
and also add an isEqualToXxx: (isEqualToPerson: in this case) method.
- Objects are not equal if they are not same class.
- Objects are equal if values of specified properties are all equal.
The hash algorithm is from Mike Ash's blog post.
Override description with one line of code:
@implementation Person
description_properties(firstName, lastName);
@endThe description_properties macro will generate description method
which will return formatted string:
<ClassName: PointerAddress, prop0=value0, prop1=value1 ... >
Objectify is available under the MIT license. See the LICENSE file for more info.