Package com.google.clearsilver.jsilver.values

Examples of com.google.clearsilver.jsilver.values.Value.asNumber()


   * @param args Single numeric value
   * @return Absolute value
   */
  public Value execute(Value... args) {
    Value arg = args[0];
    return literalConstant(abs(arg.asNumber()), arg);
  }

}
View Full Code Here


   * @return Smallest of these
   */
  public Value execute(Value... args) {
    Value left = args[0];
    Value right = args[1];
    return literalConstant(min(left.asNumber(), right.asNumber()), left, right);
  }
}
View Full Code Here

   * @return Largest of these
   */
  public Value execute(Value... args) {
    Value left = args[0];
    Value right = args[1];
    return literalConstant(max(left.asNumber(), right.asNumber()), left, right);
  }

}
View Full Code Here

public class LessOrEqualFunction extends NonEscapingFunction {

  public Value execute(Value... args) {
    Value left = args[0];
    Value right = args[1];
    return literalConstant(left.asNumber() <= right.asNumber(), left, right);
  }

}
View Full Code Here

public class NumericNotEqualFunction extends NonEscapingFunction {

  public Value execute(Value... args) {
    Value left = args[0];
    Value right = args[1];
    return literalConstant(left.asNumber() != right.asNumber(), left, right);
  }

}
View Full Code Here

public class NumericEqualFunction extends NonEscapingFunction {

  public Value execute(Value... args) {
    Value left = args[0];
    Value right = args[1];
    return literalConstant(left.asNumber() == right.asNumber(), left, right);
  }

}
View Full Code Here

public class MultiplyFunction extends NonEscapingFunction {

  public Value execute(Value... args) {
    Value left = args[0];
    Value right = args[1];
    return literalConstant(left.asNumber() * right.asNumber(), left, right);
  }

}
View Full Code Here

public class GreaterFunction extends NonEscapingFunction {

  public Value execute(Value... args) {
    Value left = args[0];
    Value right = args[1];
    return literalConstant(left.asNumber() > right.asNumber(), left, right);
  }

}
View Full Code Here

*/
public class NumericFunction extends NonEscapingFunction {

  public Value execute(Value... args) {
    Value value = args[0];
    return literalConstant(value.asNumber(), value);
  }

}
View Full Code Here

public class GreaterOrEqualFunction extends NonEscapingFunction {

  public Value execute(Value... args) {
    Value left = args[0];
    Value right = args[1];
    return literalConstant(left.asNumber() >= right.asNumber(), left, right);
  }

}
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.