Class EqualityDelegateSupport
java.lang.Object
com.inductiveautomation.ignition.common.xmlserialization.serialization.equalitydelegates.EqualityDelegateSupport
When the default equals() and hashCode() of a class needs to be overridden for any purpose. An
EqualityDelegate can supply an alternate definition for these two methods. The following methods:
safeEquals(Object, Object)
, safeHashCode(Object)
should be used in place of the standard methods for equality checks and hash code generation.
A specific use of this class provides alternative definitions for serialization purposes
(check out: ReferenceTracker)-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
containsKey
(Class<?> key) protected EqualityDelegate
void
registerEqualityDelegate
(Class<?> key, EqualityDelegate<?> delegate) boolean
safeEquals
(Object foo, Object bar) equals that uses null-safe equality (null==null: true) and the delegates to the equalityDelegates if there is one registered for the argument class.int
safeHashCode
(Object foo)
-
Constructor Details
-
EqualityDelegateSupport
public EqualityDelegateSupport()
-
-
Method Details
-
get
-
containsKey
-
registerEqualityDelegate
-
safeHashCode
-
safeEquals
equals that uses null-safe equality (null==null: true) and the delegates to the equalityDelegates if there is one registered for the argument class.
-