org.apache.directory.shared.ldap.schema
Class NormalizingComparator
java.lang.Object
org.apache.directory.shared.ldap.schema.NormalizingComparator
- All Implemented Interfaces:
- Comparator
public class NormalizingComparator
- extends Object
- implements Comparator
A comparator which normalizes a value first before using a subordinate
comparator to compare them.
- Version:
- $Rev: 434411 $
- Author:
- Apache Directory Project
Method Summary |
int |
compare(Object o1,
Object o2)
If any normalization attempt fails we compare using the unnormalized
object. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NormalizingComparator
public NormalizingComparator(Normalizer normalizer,
Comparator comparator)
- A comparator which normalizes a value first before comparing them.
- Parameters:
normalizer
- the Normalizer to normalize values with before comparingcomparator
- the underlying comparator to use for comparisons
compare
public int compare(Object o1,
Object o2)
- If any normalization attempt fails we compare using the unnormalized
object.
- Specified by:
compare
in interface Comparator
- See Also:
Comparator.compare(Object, Object)
Copyright © 2004-2012. All Rights Reserved.