KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > mmbase > util > StringCompare


1 /*
2
3 This software is OSI Certified Open Source Software.
4 OSI Certified is a certification mark of the Open Source Initiative.
5
6 The license (Mozilla version 1.0) can be read at the MMBase site.
7 See http://www.MMBase.org/license
8
9 */

10 package org.mmbase.util;
11
12 /**
13  * Class to compare two strings, used by SortedVector.
14  * @see org.mmbase.util.SortedVector
15  * @see org.mmbase.util.CompareInterface
16  *
17  * @deprecated Should implement java.util.Comparator, or should not exist, because this is java.lang.String's 'natural' order.
18  * @author Rico Jansen
19  * @version $Id: StringCompare.java,v 1.7 2004/09/30 16:08:39 pierre Exp $
20  */

21 public class StringCompare implements CompareInterface {
22
23     /**
24      * The compare function called by SortedVector to sort things
25      * @see org.mmbase.util.SortedVector
26      * @see org.mmbase.util.CompareInterface
27      */

28     public int compare(Object JavaDoc thisone,Object JavaDoc other) {
29         return(((String JavaDoc)thisone).compareTo((String JavaDoc)other));
30     }
31 }
32
Popular Tags