Package org.jsonex.jsoncoder
Interface EqualsWrapper<T>
-
public interface EqualsWrapper<T>For eBay BO, there is no way to check actual equality of two BO objects. So this wrapper is to solve this issue. To override the hashCode() and equals() methods.This class is using Wrapper pattern and Prototype pattern.
It's a prototype, so that client can create a single prototype instance and set to BeanCoderContext.
At encoding runtime, the actually wrapper object will be cloned from the prototype object.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanequals(Object obj)TgetObject()Class<T>getType()Get type could return null, to avoid unnecessary dependency.inthashCode()EqualsWrapper<T>newWrapper(T obj)Prototype clone method with actually wrapped object
-
-
-
Method Detail
-
getType
Class<T> getType()
Get type could return null, to avoid unnecessary dependency.- Returns:
- The type this Wrapper will be applied to
-
newWrapper
EqualsWrapper<T> newWrapper(T obj)
Prototype clone method with actually wrapped object
-
getObject
T getObject()
- Returns:
- The wrapped Object
-
-