org.oddjob.beancmpr.comparers
Class CompositeComparersByType
java.lang.Object
org.oddjob.beancmpr.comparers.CompositeComparersByType
- All Implemented Interfaces:
- ComparersByType, HierarchicalComparer
public class CompositeComparersByType
- extends Object
- implements ComparersByType, HierarchicalComparer
A {@link Comparer that uses a number of child compares to find
the correct comparer. The comparers are queried in the order
they are specified.
- Author:
- rob
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CompositeComparersByType
public CompositeComparersByType(ComparersByType... comparers)
comparerFor
public <T> Comparer<T> comparerFor(Class<T> type)
- Description copied from interface:
ComparersByType
- Find a
Comparer
for a given type.
- Specified by:
comparerFor
in interface ComparersByType
- Type Parameters:
T
- The type of the type.- Parameters:
type
- The type.
- Returns:
- The comparer or null if one can't be found for the type.
injectComparers
public void injectComparers(ComparersByType comparers)
- Description copied from interface:
HierarchicalComparer
- Used by owner of comparers to inject the master comparer into
HierarchicalComparer
s.
- Specified by:
injectComparers
in interface HierarchicalComparer
- Parameters:
comparers
- The master comparers.
Copyright © 2013. All Rights Reserved.