de.fesenmeyer.dbnormalizer.core
Class FDAlphabeticalComparator
java.lang.Object
de.fesenmeyer.dbnormalizer.core.FDAlphabeticalComparator
- All Implemented Interfaces:
- Comparator<FD>
public class FDAlphabeticalComparator
- extends Object
- implements Comparator<FD>
Comparator implementation for sorting FDs
alphabetically. The implementation compares first
the LHS of the FDs, then the RHS.
Consider the following unordered set of FDs:
B -> F
A,B -> E
A,B -> D
The use of this comparator for sorting these FDs
has the following result:
A,B -> D
A,B -> E
B -> F
- Author:
- DF
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FDAlphabeticalComparator
public FDAlphabeticalComparator()
compare
public int compare(FD o1,
FD o2)
- Specified by:
compare
in interface Comparator<FD>