Examples of toBoolean()


Examples of anvil.core.Any.toBoolean()

          case Any.IS_UNDEFINED:
            buffer.append("null");
            break;

          case Any.IS_BOOLEAN:
            buffer.append(data.toBoolean() ? "'true'" : "'false'");
            break;

          case Any.IS_INT:
            buffer.append(data.toLong());
            break;
View Full Code Here

Examples of anvil.core.Any.toBoolean()

          } else {
            node.compile(this, Node.GET_BOOLEAN);
          }
        } else {
          if (defaultValue != null) {
            code.iconst(defaultValue.toBoolean());
          } else {
            code.iconst(false);
          }
        }
        break;
View Full Code Here

Examples of anvil.core.Any.toBoolean()


  public Any eval()
  {
    Any left = _left.eval();
    if (left.toBoolean()) {
      return left;
    } else {
      return _right.eval();
    }
  }
View Full Code Here

Examples of anvil.core.Any.toBoolean()


  public Any eval()
  {
    Any result = getChild(0).eval();
    if (result.toBoolean()) {
      return getChild(1).eval();
    } else {
      return getChild(2).eval();
    }
  }
View Full Code Here

Examples of com.caucho.quercus.env.Value.toBoolean()

      Value isEmptyElement = getIsEmptyElement();
     
      _currentNodeType = _streamReader.next();

      // php/4618
      if (isEmptyElement.toBoolean())
        return read(env);

      if (_currentNodeType == XMLStreamConstants.SPACE)
        return read(env);
View Full Code Here

Examples of com.google.enterprise.connector.spiimpl.ValueImpl.toBoolean()

          SpiConstants.PROPNAME_ISPUBLIC);
    } catch (RepositoryException ex) {
      LOGGER.log(Level.WARNING, "Failed retrieving isPublic property", ex);
      return HttpServletResponse.SC_SERVICE_UNAVAILABLE;
    }
    boolean isPublic = isPublicVal == null || isPublicVal.toBoolean();

    if (isSecurityHeaderSupported()) {
      res.setHeader("X-Gsa-Serve-Security", isPublic ? "public" : "secure");
      return HttpServletResponse.SC_OK;
    } else {
View Full Code Here

Examples of com.google.javascript.rhino.jstype.TernaryValue.toBoolean()

          double numValue = left.getDouble();
          if (numValue == 0 || numValue == 1) {
            return n;
          }
        }
        Node replacementNode = NodeUtil.booleanNode(!leftVal.toBoolean(true));
        parent.replaceChild(n, replacementNode);
        reportCodeChange();
        return replacementNode;
      case Token.POS:
        if (NodeUtil.isNumericResult(left)) {
View Full Code Here

Examples of com.google.javascript.rhino.jstype.TernaryValue.toBoolean()

    int type = n.getType();

    TernaryValue leftVal = NodeUtil.getImpureBooleanValue(left);

    if (leftVal != TernaryValue.UNKNOWN) {
      boolean lval = leftVal.toBoolean(true);

      // (TRUE || x) => TRUE (also, (3 || x) => 3)
      // (FALSE && x) => FALSE
      if (lval && type == Token.OR ||
          !lval && type == Token.AND) {
View Full Code Here

Examples of com.google.javascript.rhino.jstype.TernaryValue.toBoolean()

    TernaryValue result = evaluateComparison(n.getType(), left, right);
    if (result == TernaryValue.UNKNOWN) {
      return n;
    }

    Node newNode = NodeUtil.booleanNode(result.toBoolean(true));
    n.getParent().replaceChild(n, newNode);
    reportCodeChange();

    return newNode;
  }
View Full Code Here

Examples of com.google.javascript.rhino.jstype.TernaryValue.toBoolean()

          && lhsAssign.getString().equals(condition.getString())) {
        Node rhsAssign = getSimpleAssignmentValue(n);
        TernaryValue value = NodeUtil.getImpureBooleanValue(rhsAssign);
        if (value != TernaryValue.UNKNOWN) {
          Node replacementConditionNode =
              NodeUtil.booleanNode(value.toBoolean(true));
          condition.getParent().replaceChild(condition,
              replacementConditionNode);
          reportCodeChange();
        }
      }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.