code: public void setPrimitive(Type type, int val) {
          if (type.hasValue()) {
              this.type = type;
              this.value = val;
              this.left = null;
              this.right = null;
              this.query = null;
          } else {
              throw new IllegalArgumentException("Value provided for non-value "
                                                 + "expression type!");
          }
      }
docs: Set the primitive value of this atom expression.
  
  @param type the type of expression
  @param val  the value to check