Interface Equivalence<T>
- Type Parameters:
T
- The Type of object for which the equivalence is defined
- All Known Implementing Classes:
IdentityEquivalence
,SerialisationEquivalence
,StandardEquivalence
,StrongEquivalence
public interface Equivalence<T>
This interface defines methods for equivalence notions.
- Author:
- Julian Sander
-
Method Summary
Modifier and TypeMethodDescriptiongetName()
Return the name of this equivalence notionboolean
isEquivalent
(Collection<T> objects) Checks whether the specified collection of objects are pairwise equivalentboolean
isEquivalent
(T obj1, T obj2) Checks whether the specified objects are equivalent
-
Method Details
-
isEquivalent
Checks whether the specified objects are equivalent- Parameters:
obj1
- an object of typeEquivalence
obj2
- an object of typeEquivalence
- Returns:
- true, iff both object are equivalent wrt. this equivalence notion
-
isEquivalent
Checks whether the specified collection of objects are pairwise equivalent- Parameters:
objects
- A collection of objects of typeEquivalence
- Returns:
- true, iff all objects are equivalent wrt. this equivalence notion
-
getName
String getName()Return the name of this equivalence notion- Returns:
- name of this equivalence notion
-