Package org.assertj.core.internal
Class IterableElementComparisonStrategy<T>
java.lang.Object
org.assertj.core.internal.AbstractComparisonStrategy
org.assertj.core.internal.StandardComparisonStrategy
org.assertj.core.internal.IterableElementComparisonStrategy<T>
- All Implemented Interfaces:
ComparisonStrategy
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturnstrueif the arguments are deeply equal to each other,falseotherwise.asText()Used in error messages when a custom comparison strategy was used to compare values.booleanReturn true if comparison strategy is default/standard, false otherwisetoString()Methods inherited from class org.assertj.core.internal.StandardComparisonStrategy
duplicatesFrom, instance, isGreaterThan, isLessThan, iterableContains, iterableRemoves, iterablesRemoveFirst, newSetUsingComparisonStrategy, stringContains, stringEndsWith, stringStartsWithMethods inherited from class org.assertj.core.internal.AbstractComparisonStrategy
arrayContains, isGreaterThanOrEqualTo, isLessThanOrEqualTo
-
Constructor Details
-
IterableElementComparisonStrategy
-
-
Method Details
-
areEqual
Description copied from class:StandardComparisonStrategyReturnstrueif the arguments are deeply equal to each other,falseotherwise.It mimics the behavior of
Objects.deepEquals(Object, Object), but without performing a reference check between the two arguments. According todeepEqualsjavadoc, the reference check should be delegated to theequalsmethod of the first argument, but this is not happening. Bug JDK-8196069 also mentions this gap.- Specified by:
areEqualin interfaceComparisonStrategy- Overrides:
areEqualin classStandardComparisonStrategy- Parameters:
actual- the object to compare tootherother- the object to compare toactual- Returns:
trueif the arguments are deeply equal to each other,falseotherwise- See Also:
-
toString
-
asText
Description copied from interface:ComparisonStrategyUsed in error messages when a custom comparison strategy was used to compare values.For example
ComparatorBasedComparisonStrategyreturns:"when comparing values using " + toString()- Returns:
- the comparison strategy description used in error messages.
-
isStandard
public boolean isStandard()Description copied from interface:ComparisonStrategyReturn true if comparison strategy is default/standard, false otherwise- Specified by:
isStandardin interfaceComparisonStrategy- Overrides:
isStandardin classStandardComparisonStrategy- Returns:
- true if comparison strategy is default/standard, false otherwise
-