Package com.queomedia.commons.equals
Class NativeEqualsChecker<T>
- java.lang.Object
-
- com.queomedia.commons.equals.NativeEqualsChecker<T>
-
- Type Parameters:
T- the concrete type
- All Implemented Interfaces:
EqualsChecker<T,T>
public final class NativeEqualsChecker<T> extends Object implements EqualsChecker<T,T>
Compare two objects by there native equals method.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(T objectT, T objectK)Calculate equality by specific attributes.static <T> NativeEqualsChecker<T>getInstance()Return an instance for the correct type.
-
-
-
Method Detail
-
getInstance
public static <T> NativeEqualsChecker<T> getInstance()
Return an instance for the correct type.- Type Parameters:
T- the concrete type- Returns:
- the native equals checker
-
equals
public boolean equals(T objectT, T objectK)
Description copied from interface:EqualsCheckerCalculate equality by specific attributes.- Specified by:
equalsin interfaceEqualsChecker<T,T>- Parameters:
objectT- the first object, of type TobjectK- the other object, of type K- Returns:
- true if the objects are equals by some specific attributes
-
-