The equals method of the Object Class contains the following signatures:
equals(Category other)
equals(Object other)
Tests a category for equality with another category. Two categories are equal if they have the same name.
public boolean equals(Category other);
Returns true if other is not null and the two categories have the same name; otherwise, returns false.
other | The other Category object to test for equality. |
Tests a category for equality with another object.
public boolean equals(Object other);
Returns true if the other object is a category and the two categories are equal; otherwise, returns false.
other | The other object to test for equality. |