Project Wonder 5.0

er.extensions.foundation
Class ERXEqualator

java.lang.Object
  extended by er.extensions.foundation.ERXEqualator

public abstract class ERXEqualator
extends java.lang.Object

This class is an abstract class that defines an API for determining if two objects are equal. This is useful if you'd like to have a custom definition of what it means for two objects to be equal in one context (within an array, for example) while not changing the meaning of equality in another (by overriding equals()). This is especially useful for doing non-editing-context-sensitive equality checks between EOs.


Field Summary
static ERXEqualator EOEqualsEqualator
          Provides EO equality checks regardless of the editing context the objects are registered in.
static ERXEqualator SafeEqualsEqualator
          Provides a safe equality check that won't throw if one or both of the objects is null.
 
Constructor Summary
ERXEqualator()
           
 
Method Summary
abstract  boolean objectIsEqualToObject(java.lang.Object o1, java.lang.Object o2)
          Performs the equality check between o1 and o2.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SafeEqualsEqualator

public static final ERXEqualator SafeEqualsEqualator
Provides a safe equality check that won't throw if one or both of the objects is null.

See Also:
ERXExtensions#safeEquals(Object, Object)

EOEqualsEqualator

public static final ERXEqualator EOEqualsEqualator
Provides EO equality checks regardless of the editing context the objects are registered in.

See Also:
ERXEOControlUtilities#eoEquals(EOEnterpriseObject, EOEnterpriseObject)
Constructor Detail

ERXEqualator

public ERXEqualator()
Method Detail

objectIsEqualToObject

public abstract boolean objectIsEqualToObject(java.lang.Object o1,
                                              java.lang.Object o2)
Performs the equality check between o1 and o2. What the equality check means between the objects and when either object is null or when objects are of different classes is the subclass's responsibility.

Parameters:
o1 - first object to compare.
o2 - second object to compare.
Returns:
true if o1 and o2 are to be considered equal, false otherwise.

Last updated: Tue, Feb 21, 2017 • 05:45 PM CET

Copyright © 2002 – 2007 Project Wonder.