-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathCQLAndNode.java
More file actions
34 lines (32 loc) · 952 Bytes
/
CQLAndNode.java
File metadata and controls
34 lines (32 loc) · 952 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
package org.z3950.zing.cql;
/**
* Represents an AND node in a CQL parse-tree.
*
*/
public class CQLAndNode extends CQLBooleanNode {
/**
* Creates a new AND node with the specified left- and right-hand
* sides and modifiers.
*
* @param left the left-hand side of the AND
* @param right the right-hand side of the AND
* @param ms the modifiers to apply to this AND
* @see ModifierSet
* @see CQLNode
* @see CQLBoolean
* @see CQLBooleanNode
*/
public CQLAndNode(CQLNode left, CQLNode right, ModifierSet ms) {
super(left, right, ms, CQLBoolean.AND);
}
// ### Too much code duplication here with OR and NOT
@Override
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;
}
}