/*
 * Created on Aug 24, 2005
 *
 * TODO To change the template for this generated file go to
 * Window - Preferences - Java - Code Style - Code Templates
 */
package jreport.uds.javabean;

import java.util.Comparator;

/**
 * @author jennyw
 *
 * TODO To change the template for this generated type comment go to
 * Window - Preferences - Java - Code Style - Code Templates
 */
public class ColumnInfoComparator implements Comparator {

	/* (non-Javadoc)
	 * @see java.util.Comparator#compare(java.lang.Object, java.lang.Object)
	 */
	public int compare(Object o1, Object o2) {
		if( o1 instanceof ColumnInfo && o2 instanceof ColumnInfo){
			return ((ColumnInfo)o1).getName().toUpperCase().compareTo(((ColumnInfo)o2).getName().toUpperCase()); 
		}
		return 0;
	}

}
