Package com.irurueta.hermes
Interface ComparableItem<T extends ComparableItem<T>>
- Type Parameters:
T
- type of item.
public interface ComparableItem<T extends ComparableItem<T>>
Interface of items that can be compared to other items in a collection.
-
Method Summary
Modifier and TypeMethodDescriptionboolean
equalContent
(T other) Determines whether the content of this item is equal to the content of another item.boolean
Determines whether this item is equal to another item (e.g., has the same identifier).
-
Method Details
-
equals
Determines whether this item is equal to another item (e.g., has the same identifier). This method MUST NOT check if the content of all items is equal, only if they represent the same item. -
equalContent
Determines whether the content of this item is equal to the content of another item.- Parameters:
other
- another item to be compared.- Returns:
- true if the content of both items is equal, false otherwise.
-