KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > hibernate > test > legacy > StringComparator


1 package org.hibernate.test.legacy;
2
3 import java.io.Serializable JavaDoc;
4 import java.util.Comparator JavaDoc;
5
6 public class StringComparator implements Comparator JavaDoc, Serializable JavaDoc {
7
8     public int compare(Object JavaDoc o1, Object JavaDoc o2) {
9         return ( (String JavaDoc) o1 ).toLowerCase().compareTo( ( (String JavaDoc) o2 ).toLowerCase() );
10     }
11
12 }
13
Popular Tags