|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.alfresco.util.EqualsHelper
public class EqualsHelper
Utility class providing helper methods for various types of equals
functionality
Nested Class Summary | |
---|---|
static class |
EqualsHelper.MapValueComparison
Enumeration for results returned by map comparisons . |
Constructor Summary | |
---|---|
EqualsHelper()
|
Method Summary | |
---|---|
static boolean |
binaryStreamEquals(java.io.InputStream left,
java.io.InputStream right)
Performs a byte-level comparison between two streams. |
static java.util.Map |
getMapComparison(java.util.Map left,
java.util.Map right)
Compare two maps. |
static java.lang.String |
getMapDifferenceReport(java.util.Map actual,
java.util.Map expected)
Compare two maps and generate a difference report between the actual and expected values. |
static boolean |
nullSafeEquals(java.lang.Object left,
java.lang.Object right)
Performs an equality check left.equals(right) after checking for null values |
static boolean |
nullSafeEquals(java.lang.String left,
java.lang.String right,
boolean ignoreCase)
Performs an case-sensitive or case-insensitive equality check after checking for null values |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public EqualsHelper()
Method Detail |
---|
public static boolean nullSafeEquals(java.lang.Object left, java.lang.Object right)
left.equals(right)
after checking for null values
left
- the Object appearing in the left side of an equals
statementright
- the Object appearing in the right side of an equals
statement
public static boolean nullSafeEquals(java.lang.String left, java.lang.String right, boolean ignoreCase)
ignoreCase
- true to ignore casepublic static boolean binaryStreamEquals(java.io.InputStream left, java.io.InputStream right) throws java.io.IOException
left
- the left stream. This is closed at the end of the operation.right
- an right stream. This is closed at the end of the operation.
java.io.IOException
public static java.lang.String getMapDifferenceReport(java.util.Map actual, java.util.Map expected)
actual
- the map in handexpected
- the map expected
public static java.util.Map getMapComparison(java.util.Map left, java.util.Map right)
EqualsHelper.MapValueComparison.LEFT_ONLY
EqualsHelper.MapValueComparison.RIGHT_ONLY
EqualsHelper.MapValueComparison.EQUAL
EqualsHelper.MapValueComparison.NOT_EQUAL
left
- the left side of the comparisonright
- the right side of the comparison
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |