FileDocCategorySizeDatePackage
MathTool.javaAPI DocExample981Thu Apr 05 20:30:02 BST 2001None

MathTool

public class MathTool extends Object implements ContextTool

Fields Summary
Constructors Summary
Methods Summary
public static intadd(int x, int y)

    return x + y;
  
public static intdivide(int x, int y)

    return x / y;
  
public static booleangreaterThan(int x, int y)

    return (x > y);
  
public java.lang.Objectinit(Context c)
A new tool object will be instantiated per-request by calling this method. A ContextTool is effectively a factory used to create objects for use in templates. Some tools may simply return themselves from this method; others may instantiate new objects to hold the per-request state.

    return this;
  
public static booleanlessThan(int x, int y)

    return (x < y);
  
public static intmod(int x, int y)

    return x % y;
  
public static intmultiply(int x, int y)

    return x * y;
  
public static intsubtract(int x, int y)

    return x - y;