net.sf.molae.logic.test
Class DefaultEqualityTest
java.lang.Object
|
+--net.sf.molae.logic.test.DefaultEqualityTest
- All Implemented Interfaces:
- EqualityTest
- public class DefaultEqualityTest
- extends Object
- implements EqualityTest
Defines if two objects are equal or not
independent from the standard equals method.
- Since:
- 1.1
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DefaultEqualityTest
protected DefaultEqualityTest()
- Constructs a new DefaultEqualityTest.
getInstance
public static DefaultEqualityTest getInstance()
- Returns the singleton instance of this class.
- Returns:
- the singleton instance of this class.
isEqualTo
protected boolean isEqualTo(Object o1,
Object o2)
- Checks if the two specified objects are regarded
equal.
Helper method to avoid double code.
Only the first object is handled.
- Parameters:
o1 - first object to compareo2 - second object to compare- Returns:
true if the two specified objects are regarded
equal.
areEqual
public boolean areEqual(Object o1,
Object o2)
- Description copied from interface:
EqualityTest
- Checks if the two specified objects are regarded
equal.
- Specified by:
areEqual in interface EqualityTest
- Following copied from interface:
net.sf.molae.logic.tools.EqualityTest
- Parameters:
o1 - first object to compareo2 - second object to compare- Returns:
true if the two specified objects are regarded
equal.