ca.sqlpower.architect
Class SQLColumn.ColumnNameComparator

java.lang.Object
  extended by ca.sqlpower.architect.SQLColumn.ColumnNameComparator
All Implemented Interfaces:
java.util.Comparator
Enclosing class:
SQLColumn

public static class SQLColumn.ColumnNameComparator
extends java.lang.Object
implements java.util.Comparator

A comparator for SQLColumns that only pays attention to the column names. For example, if column1 has name = "MY_COLUMN" and type = VARCHAR(20) and column2 has name = "MY_COLUMN" and type VARCHAR(4), compare(column1, column2) will return 0.


Constructor Summary
SQLColumn.ColumnNameComparator()
           
 
Method Summary
 int compare(java.lang.Object o1, java.lang.Object o2)
          Forwards to compare(SQLColumn,SQLColumn).
 int compare(SQLColumn c1, SQLColumn c2)
          See class description for behaviour of this method.
 
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

SQLColumn.ColumnNameComparator

public SQLColumn.ColumnNameComparator()
Method Detail

compare

public int compare(java.lang.Object o1,
                   java.lang.Object o2)
Forwards to compare(SQLColumn,SQLColumn).

Specified by:
compare in interface java.util.Comparator
Throws:
java.lang.ClassCastException - if o1 or o2 is not of class SQLColumn.

compare

public int compare(SQLColumn c1,
                   SQLColumn c2)
See class description for behaviour of this method.



Copyright © 2003-2007 SQL Power Group Inc. www.sqlpower.ca