Top Description Constructors Methods
org.assertj.core.internal

public abstract Class AbstractComparisonStrategy

extends Object
implements ComparisonStrategy
Class Inheritance
All Implemented Interfaces
org.assertj.core.internal.ComparisonStrategy
Known Direct Subclasses
org.assertj.core.internal.StandardComparisonStrategy, org.assertj.core.internal.ComparatorBasedComparisonStrategy
Static Imports
java.lang.reflect.Array.getLength, java.util.Collections.EMPTY_SET, org.assertj.core.util.IterableUtil.isNullOrEmpty

Base implementation of ComparisonStrategy contract.
Author
Joel Costigliola

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public boolean
arrayContains(Object
the array to search value in (must not be null)
array
,
Object
the object to look for in given array
value
)

Implements org.assertj.core.internal.ComparisonStrategy.arrayContains.

Returns true if given array contains given value according to the implemented comparison strategy, false otherwise.
public Iterable<?>
duplicatesFrom(Iterable<?>
the given Iterable we want to extract duplicate elements.
iterable
)

Implements org.assertj.core.internal.ComparisonStrategy.duplicatesFrom.

Returns any duplicate elements from the given Iterable according to the implemented comparison strategy.
public boolean
isGreaterThanOrEqualTo(Object
the object to compare to other
actual
,
Object
the object to compare to actual
other
)

Implements org.assertj.core.internal.ComparisonStrategy.isGreaterThanOrEqualTo.

Returns true if actual is greater than or equal to other, false otherwise.
public boolean
isLessThan(Object
the object to compare to other
actual
,
Object
the object to compare to actual
other
)

Implements org.assertj.core.internal.ComparisonStrategy.isLessThan.

Returns true if actual is less than other, false otherwise.
public boolean
isLessThanOrEqualTo(Object
the object to compare to other
actual
,
Object
the object to compare to actual
other
)

Implements org.assertj.core.internal.ComparisonStrategy.isLessThanOrEqualTo.

Returns true if actual is less than or equal to other, false otherwise.
public boolean
isStandard()

Implements org.assertj.core.internal.ComparisonStrategy.isStandard.

Return true if comparison strategy is default/standard, false otherwise
protected abstract Set<Object>

Returns:

a Set honoring the comparison strategy used.
newSetUsingComparisonStrategy
()

Returns a Set honoring the comparison strategy used.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

AbstractComparisonStrategyback to summary
public AbstractComparisonStrategy()

Method Detail

arrayContainsback to summary
public boolean arrayContains(Object array, Object value)

Implements org.assertj.core.internal.ComparisonStrategy.arrayContains.

Doc from org.assertj.core.internal.ComparisonStrategy.arrayContains.

Returns true if given array contains given value according to the implemented comparison strategy, false otherwise.

Parameters
array:Object

the array to search value in (must not be null)

value:Object

the object to look for in given array

Returns:boolean

true if given array contains given value according to the implemented comparison strategy, false otherwise.

Annotations
@Override
duplicatesFromback to summary
public Iterable<?> duplicatesFrom(Iterable<?> iterable)

Implements org.assertj.core.internal.ComparisonStrategy.duplicatesFrom.

Doc from org.assertj.core.internal.ComparisonStrategy.duplicatesFrom.

Returns any duplicate elements from the given Iterable according to the implemented comparison strategy.

Parameters
iterable:Iterable<?>

the given Iterable we want to extract duplicate elements.

Returns:Iterable<?>

an Iterable containing the duplicate elements of the given one. If no duplicates are found, an empty Iterable is returned.

Annotations
@Override
isGreaterThanOrEqualToback to summary
public boolean isGreaterThanOrEqualTo(Object actual, Object other)

Implements org.assertj.core.internal.ComparisonStrategy.isGreaterThanOrEqualTo.

Doc from org.assertj.core.internal.ComparisonStrategy.isGreaterThanOrEqualTo.

Returns true if actual is greater than or equal to other, false otherwise.

Parameters
actual:Object

the object to compare to other

other:Object

the object to compare to actual

Returns:boolean

true if actual is greater than or equal to other, false otherwise.

Annotations
@Override
isLessThanback to summary
public boolean isLessThan(Object actual, Object other)

Implements org.assertj.core.internal.ComparisonStrategy.isLessThan.

Doc from org.assertj.core.internal.ComparisonStrategy.isLessThan.

Returns true if actual is less than other, false otherwise.

Parameters
actual:Object

the object to compare to other

other:Object

the object to compare to actual

Returns:boolean

true if actual is less than other, false otherwise.

Annotations
@Override
isLessThanOrEqualToback to summary
public boolean isLessThanOrEqualTo(Object actual, Object other)

Implements org.assertj.core.internal.ComparisonStrategy.isLessThanOrEqualTo.

Doc from org.assertj.core.internal.ComparisonStrategy.isLessThanOrEqualTo.

Returns true if actual is less than or equal to other, false otherwise.

Parameters
actual:Object

the object to compare to other

other:Object

the object to compare to actual

Returns:boolean

true if actual is less than or equal to other, false otherwise.

Annotations
@Override
isStandardback to summary
public boolean isStandard()

Implements org.assertj.core.internal.ComparisonStrategy.isStandard.

Doc from org.assertj.core.internal.ComparisonStrategy.isStandard.

Return true if comparison strategy is default/standard, false otherwise

Returns:boolean

true if comparison strategy is default/standard, false otherwise

Annotations
@Override
newSetUsingComparisonStrategyback to summary
protected abstract Set<Object> newSetUsingComparisonStrategy()

Returns a Set honoring the comparison strategy used.

Returns:Set<Object>

a Set honoring the comparison strategy used.