Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

Source code: org/sablecc/sablecc/StringComparator.java


1   /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
2    * This file is part of SableCC.                             *
3    * See the file "LICENSE" for copyright information and the  *
4    * terms and conditions for copying, distribution and        *
5    * modification of SableCC.                                  *
6    * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
7   
8   package org.sablecc.sablecc;
9   
10  import java.util.*;
11  import com.sun.java.util.collections.*;
12  
13  public class StringComparator implements Comparator
14  {
15      public final static StringComparator instance = new StringComparator();
16  
17      private StringComparator()
18      {
19      }
20  
21      public int compare(Object o1, Object o2)
22      {
23          return ((String) o1).compareTo((String) o2);
24      }
25  }
26