Make constants read-only
authorJakub Skoczen <jakub@indexdata.dk>
Fri, 22 Jul 2011 09:22:41 +0000 (11:22 +0200)
committerJakub Skoczen <jakub@indexdata.dk>
Fri, 22 Jul 2011 09:22:41 +0000 (11:22 +0200)
src/main/java/org/z3950/zing/cql/CQLLexer.java
src/main/java/org/z3950/zing/cql/CQLParser.java

index 7aca234..31abebc 100644 (file)
@@ -16,15 +16,15 @@ import java.util.Hashtable;
 //
 class CQLLexer extends StreamTokenizer {
     // New publicly visible token-types
-    static int TT_LE        = 1000;    // The "<=" relation
-    static int TT_GE        = 1001;    // The ">=" relation
-    static int TT_NE        = 1002;    // The "<>" relation
-    static int TT_EQEQ      = 1003;    // The "==" relation
-    static int TT_AND       = 1004;    // The "and" boolean
-    static int TT_OR        = 1005;    // The "or" boolean
-    static int TT_NOT       = 1006;    // The "not" boolean
-    static int TT_PROX      = 1007;    // The "prox" boolean
-    static int TT_SORTBY     = 1008;   // The "sortby" operator
+    public final static int TT_LE        = 1000;       // The "<=" relation
+    public final static int TT_GE        = 1001;       // The ">=" relation
+    public final static int TT_NE        = 1002;       // The "<>" relation
+    public final static int TT_EQEQ      = 1003;       // The "==" relation
+    public final static int TT_AND       = 1004;       // The "and" boolean
+    public final static int TT_OR        = 1005;       // The "or" boolean
+    public final static int TT_NOT       = 1006;       // The "not" boolean
+    public final static int TT_PROX      = 1007;       // The "prox" boolean
+    public final static int TT_SORTBY     = 1008;      // The "sortby" operator
 
     // Support for keywords.  It would be nice to compile this linear
     // list into a Hashtable, but it's hard to store ints as hash
index cf1272c..dd69218 100644 (file)
@@ -19,9 +19,9 @@ import java.io.FileNotFoundException;
 public class CQLParser {
     private CQLLexer lexer;
     private int compat;        // When false, implement CQL 1.2
-    public static int V1POINT1 = 12368;
-    public static int V1POINT2 = 12369;
-    public static int V1POINT1SORT = 12370;
+    public static final int V1POINT1 = 12368;
+    public static final int V1POINT2 = 12369;
+    public static final int V1POINT1SORT = 12370;
 
     static private boolean DEBUG = false;
     static private boolean LEXDEBUG = false;