Examples of toBoolean()


Examples of com.google.template.soy.data.SoyData.toBoolean()

      return// cannot simplify
    }

    ExprNode replacementNode;
    if (operand0 != null && operand1 != null) {
      replacementNode = new BooleanNode(operand0.toBoolean() || operand1.toBoolean());
    } else if (operand0 != null) {
      replacementNode = operand0.toBoolean() ? new BooleanNode(true) : node.getChild(1);
    } else /*(operand1 != null)*/ {
      replacementNode = operand1.toBoolean() ? new BooleanNode(true) : node.getChild(0);
    }
View Full Code Here

Examples of com.google.template.soy.data.SoyData.toBoolean()

    if (operand0 != null && operand1 != null) {
      replacementNode = new BooleanNode(operand0.toBoolean() || operand1.toBoolean());
    } else if (operand0 != null) {
      replacementNode = operand0.toBoolean() ? new BooleanNode(true) : node.getChild(1);
    } else /*(operand1 != null)*/ {
      replacementNode = operand1.toBoolean() ? new BooleanNode(true) : node.getChild(0);
    }

    node.getParent().replaceChild(node, replacementNode);
  }

View Full Code Here

Examples of com.google.template.soy.data.SoyData.toBoolean()

    SoyData operand0 = getConstantOrNull(node.getChild(0));
    if (operand0 == null) {
      return// cannot simplify
    }

    ExprNode replacementNode = operand0.toBoolean() ? node.getChild(1) : node.getChild(2);
    node.getParent().replaceChild(node, replacementNode);
  }


  // -----------------------------------------------------------------------------------------------
View Full Code Here

Examples of com.google.template.soy.data.SoyData.toBoolean()

  @Override protected SoyData visitAndOpNode(AndOpNode node) {

    // Note: Short-circuit evaluation.
    SoyData operand0 = visit(node.getChild(0));
    if (!operand0.toBoolean()) {
      return convertResult(false);
    } else {
      SoyData operand1 = visit(node.getChild(1));
      return convertResult(operand1.toBoolean());
    }
View Full Code Here

Examples of com.google.template.soy.data.SoyData.toBoolean()

    SoyData operand0 = visit(node.getChild(0));
    if (!operand0.toBoolean()) {
      return convertResult(false);
    } else {
      SoyData operand1 = visit(node.getChild(1));
      return convertResult(operand1.toBoolean());
    }
  }


  @Override protected SoyData visitOrOpNode(OrOpNode node) {
View Full Code Here

Examples of com.google.template.soy.data.SoyData.toBoolean()

  @Override protected SoyData visitOrOpNode(OrOpNode node) {

    // Note: Short-circuit evaluation.
    SoyData operand0 = visit(node.getChild(0));
    if (operand0.toBoolean()) {
      return convertResult(true);
    } else {
      SoyData operand1 = visit(node.getChild(1));
      return convertResult(operand1.toBoolean());
    }
View Full Code Here

Examples of com.google.template.soy.data.SoyData.toBoolean()

    SoyData operand0 = visit(node.getChild(0));
    if (operand0.toBoolean()) {
      return convertResult(true);
    } else {
      SoyData operand1 = visit(node.getChild(1));
      return convertResult(operand1.toBoolean());
    }
  }


  @Override protected SoyData visitConditionalOpNode(ConditionalOpNode node) {
View Full Code Here

Examples of com.google.template.soy.data.SoyData.toBoolean()

  @Override protected SoyData visitConditionalOpNode(ConditionalOpNode node) {

    // Note: We only evaluate the part that we need.
    SoyData operand0 = visit(node.getChild(0));
    if (operand0.toBoolean()) {
      return visit(node.getChild(1));
    } else {
      return visit(node.getChild(2));
    }
  }
View Full Code Here

Examples of com.sun.star.uno.AnyConverter.toBoolean()

        com.sun.star.beans.XPropertySet xPropSet = (com.sun.star.beans.XPropertySet)
            UnoRuntime.queryInterface( com.sun.star.beans.XPropertySet.class, getDocument() );

        AnyConverter aAnyConv = new AnyConverter();
        String aText = "Value of property IsIterationEnabled: ";
        aText += aAnyConv.toBoolean(xPropSet.getPropertyValue( "IsIterationEnabled" ));
        System.out.println( aText );
        aText = "Value of property IterationCount: ";
        aText += aAnyConv.toInt(xPropSet.getPropertyValue( "IterationCount" ));
        System.out.println( aText );
        aText = "Value of property NullDate: ";
View Full Code Here

Examples of com.sun.star.uno.AnyConverter.toBoolean()

            for ( int i=0; i<aNames.length; i++ )
            {
                Object aRangeObj = xRanges.getByName( aNames[i] );
                com.sun.star.beans.XPropertySet xRangeProp = (com.sun.star.beans.XPropertySet)
                    UnoRuntime.queryInterface( com.sun.star.beans.XPropertySet.class, aRangeObj );
                boolean bUser = aAnyConv.toBoolean(xRangeProp.getPropertyValue( "IsUserDefined" ));
                if ( !bUser )
                {
                    // this is the temporary database range - get the cell range and format it
                    com.sun.star.sheet.XCellRangeReferrer xRef = ( com.sun.star.sheet.XCellRangeReferrer )
                        UnoRuntime.queryInterface( com.sun.star.sheet.XCellRangeReferrer.class, aRangeObj );
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.