public class EqualsHelper
extends java.lang.Object
equals functionality| Modifier and Type | Class and Description |
|---|---|
static class |
EqualsHelper.MapValueComparison
Enumeration for results returned by
map comparisons. |
| Constructor and Description |
|---|
EqualsHelper() |
| Modifier and Type | Method and Description |
|---|---|
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
|
public static boolean nullSafeEquals(java.lang.Object left,
java.lang.Object right)
left.equals(right) after checking for null valuesleft - the Object appearing in the left side of an equals statementright - the Object appearing in the right side of an equals statementpublic 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.IOExceptionpublic static java.lang.String getMapDifferenceReport(java.util.Map actual,
java.util.Map expected)
actual - the map in handexpected - the map expectedpublic static java.util.Map getMapComparison(java.util.Map left,
java.util.Map right)
left - the left side of the comparisonright - the right side of the comparisonCopyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.