Comment.
[cql-java-moved-to-github.git] / src / org / z3950 / zing / cql / CQLAndNode.java
index 170b76d..90d54a1 100644 (file)
@@ -1,15 +1,17 @@
-// $Id: CQLAndNode.java,v 1.1 2002-10-25 07:38:16 mike Exp $
+// $Id: CQLAndNode.java,v 1.6 2002-12-05 17:14:52 mike Exp $
 
 package org.z3950.zing.cql;
 
 
 /**
- * Represents an AND node in a CQL parse-tree ...
- * ###
+ * Represents an AND node in a CQL parse-tree.
  *
- * @version    $Id: CQLAndNode.java,v 1.1 2002-10-25 07:38:16 mike Exp $
+ * @version    $Id: CQLAndNode.java,v 1.6 2002-12-05 17:14:52 mike Exp $
  */
-class CQLAndNode extends CQLBooleanNode {
+public class CQLAndNode extends CQLBooleanNode {
+    /**
+     * Creates a new AND node with the specified left- and right-hand sides.
+     */
     public CQLAndNode(CQLNode left, CQLNode right) {
        this.left = left;
        this.right = right;
@@ -18,4 +20,14 @@ class CQLAndNode extends CQLBooleanNode {
     String op() {
        return "and";
     }
+
+    // ### Too much code duplication here with OR and NOT
+    byte[] opType1() {
+       byte[] op = new byte[5];
+       putTag(CONTEXT, 46, CONSTRUCTED, op, 0); // Operator
+       putLen(2, op, 2);
+       putTag(CONTEXT, 0, PRIMITIVE, op, 3); // and
+       putLen(0, op, 4);
+       return op;
+    }
 }