1 /*
2 * This file is a part of CAST project.
3 * (c) Copyright 2007, AGH University of Science & Technology
4 * https://caribou.iisg.agh.edu.pl/trac/cast
5 *
6 * Licensed under the Eclipse Public License, Version 1.0 (the "License").
7 * You may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
9 * http://www.eclipse.org/legal/epl-v10.html
10 */
11 /*
12 * File: ModelColumnComparator.java
13 * Created: 2007-12-13
14 * Author: bmilos
15 * $Id: ModelColumnComparator.java 2335 2009-01-13 16:40:16Z entrop $
16 */
17
18 package pl.edu.agh.cast.model;
19
20 import java.util.Comparator;
21
22 /**
23 * Comparator that compares model columns by their names.
24 *
25 * @author AGH CAST Team
26 *
27 */
28 public class ModelColumnComparator implements Comparator<ModelColumn> {
29
30 /**
31 * {@inheritDoc}
32 *
33 * @see java.util.Comparator#compare(java.lang.Object, java.lang.Object)
34 */
35 public int compare(ModelColumn column1, ModelColumn column2) {
36 return column1.getName().compareTo(column2.getName());
37 }
38
39 }