org.oddjob.beancmpr.matchables
Class OrderedMatchablesComparer

java.lang.Object
  extended by org.oddjob.beancmpr.matchables.OrderedMatchablesComparer
All Implemented Interfaces:
Comparer<Iterable<? extends MatchableGroup>>

public class OrderedMatchablesComparer
extends Object
implements Comparer<Iterable<? extends MatchableGroup>>

Compares two Iterables of MatchableGroups.

Author:
Rob.

Constructor Summary
OrderedMatchablesComparer(org.oddjob.arooa.reflect.PropertyAccessor accessor, BeanComparerProvider comparerProvider, BeanCmprResultsHandler resultsHandler)
           
 
Method Summary
 IterableComparison<MatchableGroup> compare(Iterable<? extends MatchableGroup> x, Iterable<? extends MatchableGroup> y)
          Compare two things.
 BeanComparerProvider getDifferentiatorProvider()
           
 BeanCmprResultsHandler getMatchProcessor()
           
 MultiItemComparisonCounts getMultiItemComparisonStats()
           
 Class<?> getType()
          The type of the things.
protected  void groupMatch(MatchableGroup fromX, MatchableGroup fromY)
          Performs a match for two groups of Matchables that are for the same key.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OrderedMatchablesComparer

public OrderedMatchablesComparer(org.oddjob.arooa.reflect.PropertyAccessor accessor,
                                 BeanComparerProvider comparerProvider,
                                 BeanCmprResultsHandler resultsHandler)
Method Detail

getMultiItemComparisonStats

public MultiItemComparisonCounts getMultiItemComparisonStats()

compare

public IterableComparison<MatchableGroup> compare(Iterable<? extends MatchableGroup> x,
                                                  Iterable<? extends MatchableGroup> y)
Description copied from interface: Comparer
Compare two things.

Specified by:
compare in interface Comparer<Iterable<? extends MatchableGroup>>
Parameters:
x - One thing.
y - The other thing.
Returns:
A Comparison. The may be null if either or both of x and y is null.

groupMatch

protected void groupMatch(MatchableGroup fromX,
                          MatchableGroup fromY)
Performs a match for two groups of Matchables that are for the same key.

Parameters:
fromX -
fromY -

getType

public Class<?> getType()
Description copied from interface: Comparer
The type of the things.

Note that we would have liked the return type to be Class<T> but we could not then have had a Comparer<Iterable<MatchableGroup>> because it's not possible to return a type of Class<Iterable<MatchableGroup>> in Java. If there is a solution to this then please let us know.

Specified by:
getType in interface Comparer<Iterable<? extends MatchableGroup>>
Returns:
The type. Must not be null.

getMatchProcessor

public BeanCmprResultsHandler getMatchProcessor()

getDifferentiatorProvider

public BeanComparerProvider getDifferentiatorProvider()


Copyright © 2013. All Rights Reserved.