Op (Ant Contrib)
Keywords: net.sf.antcontrib.property.Op,Op class

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## net.sf.antcontrib.property
Class Op

    java.lang.Object
      |
      +--net.sf.antcontrib.property.Op

public class Op
extends java.lang.Object

Represents a mathematical operation.

Developed for use with Antelope, migrated to ant-contrib Oct 2003.

Version:
  $Revision: 1.2 $
Author:
  Dale Anson, danson@germane-software.com

Constructor Summary
`Op()`

Method Summary
`void` | `addConfiguredOp(Op op)` Add a nested operation.
`void` | `addNum(Num num)` Add a number to this operation.
`Num` | `calculate()` Perform this operation.
`void` | `setDatatype(java.lang.String p)` Sets the datatype of this calculation.
`void` | `setOp(java.lang.String op)` Set the operation.
`void` | `setStrict(boolean b)` Use the StrictMath library.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### Op

    public Op()

Method Detail

### setOp

    public void setOp(java.lang.String op)

  Set the operation.

### addNum

    public void addNum(Num num)

  Add a number to this operation. An operation can hold any number of numbers to support formulas like 5 + 4 + 3 + 2 + 1.

  Parameters:
    `num` - a number to use in this operation

### setDatatype

    public void setDatatype(java.lang.String p)

  Sets the datatype of this calculation. Allowed values are "int", "long", "float", or "double".

### addConfiguredOp

    public void addConfiguredOp(Op op)

  Add a nested operation.

### setStrict

    public void setStrict(boolean b)

  Use the StrictMath library.

### calculate

    public Num calculate()

  Perform this operation.

  Returns:
    the value resulting from the calculation as a Num.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD