org.oddjob.beancmpr.beans
Class ComparersByPropertyOrType

java.lang.Object
  extended by org.oddjob.beancmpr.beans.ComparersByPropertyOrType
All Implemented Interfaces:
BeanComparerProvider

public class ComparersByPropertyOrType
extends Object
implements BeanComparerProvider

Collects together ComparersByProperty and ComparersByType

Also provides a base set of DefaultComparersByType.

Author:
rob

Constructor Summary
ComparersByPropertyOrType()
           
ComparersByPropertyOrType(ComparersByProperty comparersByProperty, ComparersByType comparersByType)
           
 
Method Summary
<T> Comparer<T>
comparerFor(String property, Class<T> type)
          Provide a Comparer for the given property and type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ComparersByPropertyOrType

public ComparersByPropertyOrType(ComparersByProperty comparersByProperty,
                                 ComparersByType comparersByType)

ComparersByPropertyOrType

public ComparersByPropertyOrType()
Method Detail

comparerFor

public <T> Comparer<T> comparerFor(String property,
                                   Class<T> type)
Description copied from interface: BeanComparerProvider
Provide a Comparer for the given property and type.

Specified by:
comparerFor in interface BeanComparerProvider
Parameters:
property - The name of the property.
type - The type of the property.
Returns:
Never null.


Copyright © 2013. All Rights Reserved.