01: /*
02: * TableNameComparator.java
03: *
04: * This file is part of SQL Workbench/J, http://www.sql-workbench.net
05: *
06: * Copyright 2002-2008, Thomas Kellerer
07: * No part of this code maybe reused without the permission of the author
08: *
09: * To contact the author please send an email to: support@sql-workbench.net
10: *
11: */
12: package workbench.db;
13:
14: import java.util.Comparator;
15: import workbench.util.CaseInsensitiveComparator;
16:
17: /**
18: *
19: * @author support@sql-workbench.net
20: */
21: public class TableNameComparator implements Comparator<TableIdentifier> {
22: private Comparator<String> stringComparator = new CaseInsensitiveComparator();
23:
24: public TableNameComparator() {
25: }
26:
27: public int compare(TableIdentifier t1, TableIdentifier t2) {
28: return stringComparator.compare(t1.getTableName(), t2
29: .getTableName());
30: }
31:
32: }
|