org.oddjob.beancmpr.matchables
Class DefaultMatchableComparer

java.lang.Object
  extended by org.oddjob.beancmpr.matchables.DefaultMatchableComparer
All Implemented Interfaces:
Comparer<Matchable>, MatchableComparer

public class DefaultMatchableComparer
extends Object
implements MatchableComparer

Compares two Matchables.

Author:
Rob

Constructor Summary
DefaultMatchableComparer(BeanComparerProvider comparerProvider)
           
 
Method Summary
 MultiValueComparison<Matchable> compare(Matchable x, Matchable y)
          Compare two Matchables.
 BeanComparerProvider getComparerProvider()
           
 Class<Matchable> getType()
          The type of the things.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultMatchableComparer

public DefaultMatchableComparer(BeanComparerProvider comparerProvider)
Method Detail

compare

public MultiValueComparison<Matchable> compare(Matchable x,
                                               Matchable y)
Compare two Matchables.

Specified by:
compare in interface Comparer<Matchable>
Specified by:
compare in interface MatchableComparer
Parameters:
x -
y -
Returns:
A Comparison. Never null.

getComparerProvider

public BeanComparerProvider getComparerProvider()

getType

public Class<Matchable> 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<Matchable>
Returns:
The type. Must not be null.


Copyright © 2013. All Rights Reserved.