code: public void setLogical(Type type, Expr left, Expr right) {
          switch (type) {
              case AND:
              case OR:
                  this.type = type;
                  this.value = 0;
                  this.left = left;
                  this.right = right;
                  this.query = null;
                  break;
              case NOT:
                  this.type = type;
                  if (left != null && right == null)
                      this.left = left;
                  else if (left == null && right != null)
                      this.left = right;
                  else if (left != null)
                      throw new IllegalArgumentException("Only one sub-expression"
                                                         + " should be provided"
                                                         + " for NOT expressions!");
                  this.query = null;
                  this.value = 0;
                  break;
              default:
                  throw new IllegalArgumentException("Left/Right sub expressions "
                                                     + "supplied for "
                                                     + " non-logical operator!");
          }
      }
docs: Set the logical value of this atom expression.
  
  @param type  the type of expression
  @param left  the left sub-expression
  @param right the right sub-expression