return Collection.class.isAssignableFrom(type);
}
public final DiffNode compare(final DiffNode parentNode, final Instances collectionInstances)
{
final DiffNode collectionNode = newNode(parentNode, collectionInstances);
if (collectionInstances.hasBeenAdded())
{
final Collection addedItems = collectionInstances.getWorking(Collection.class);
compareItems(collectionNode, collectionInstances, addedItems);
collectionNode.setState(DiffNode.State.ADDED);
}
else if (collectionInstances.hasBeenRemoved())
{
final Collection<?> removedItems = collectionInstances.getBase(Collection.class);
compareItems(collectionNode, collectionInstances, removedItems);
collectionNode.setState(DiffNode.State.REMOVED);
}
else if (collectionInstances.areSame())
{
collectionNode.setState(DiffNode.State.UNTOUCHED);
}
else
{
final ComparisonStrategy comparisonStrategy = comparisonStrategyResolver.resolveComparisonStrategy(collectionNode);
if (comparisonStrategy == null)