Package com.google.template.soy.data

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


    SoyData operand = visit(node.getChild(0));
    if (operand instanceof IntegerData) {
      return convertResult( - operand.integerValue() );
    } else {
      return convertResult( - operand.floatValue() );
    }
  }


  @Override protected SoyData visitNotOpNode(NotOpNode node) {
View Full Code Here


    SoyData arg = args.get(0);

    if (arg instanceof IntegerData) {
      return arg;
    } else {
      return toSoyData((int) Math.floor(arg.floatValue()));
    }
  }


  @Override public JsExpr computeForJsSrc(List<JsExpr> args) {
View Full Code Here

    SoyData arg = args.get(0);

    if (arg instanceof IntegerData) {
      return arg;
    } else {
      return toSoyData((int) Math.ceil(arg.floatValue()));
    }
  }


  @Override public JsExpr computeForJsSrc(List<JsExpr> args) {
View Full Code Here

  public double getFloat(String keyStr) {
    SoyData valueData = get(keyStr);
    if (valueData == null) {
      throw new IllegalArgumentException("Missing key: " + keyStr);
    }
    return valueData.floatValue();
  }

  /**
   * Precondition: The specified key string is the path to a string.
   * Gets the string at the specified key string.
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.