de.fesenmeyer.dbnormalizer.core
Class FDAlphabeticalComparator

java.lang.Object
  extended by 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

Constructor Summary
FDAlphabeticalComparator()
           
 
Method Summary
 int compare(FD o1, FD o2)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Comparator
equals
 

Constructor Detail

FDAlphabeticalComparator

public FDAlphabeticalComparator()
Method Detail

compare

public int compare(FD o1,
                   FD o2)
Specified by:
compare in interface Comparator<FD>