|
fop 2.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.fop.fo.expr.NumericOp
public final class NumericOp
This class contains static methods to evaluate operations on Numeric operands. If the operands are absolute numerics the result is computed rigth away and a new absolute numeric is return. If one of the operands are relative a n operation node is created with the operation and the operands. The evaluation of the operation can then occur when getNumericValue() is called.
Method Summary | |
---|---|
static Numeric |
abs(Numeric op)
Return the absolute value of a Numeric. |
static Numeric |
abs2(Numeric op,
PercentBaseContext context)
Return the absolute value of a Numeric. |
static Numeric |
addition(Numeric op1,
Numeric op2)
Add the two operands and return a new Numeric representing the result. |
static Numeric |
addition2(Numeric op1,
Numeric op2,
PercentBaseContext context)
Add the two operands with a percentage context and return a new Numeric representing the result. |
static Numeric |
divide(Numeric op1,
Numeric op2)
Divide the second operand into the first and return a new Numeric representing the result. |
static Numeric |
divide2(Numeric op1,
Numeric op2,
PercentBaseContext context)
Divide the two operands with a percentage context and return a new Numeric representing the result. |
static Numeric |
max(Numeric op1,
Numeric op2)
Return the larger of the two Numerics. |
static Numeric |
max2(Numeric op1,
Numeric op2,
PercentBaseContext context)
Return the larger of the two Numerics. |
static Numeric |
min(Numeric op1,
Numeric op2)
Return the smaller of two Numerics. |
static Numeric |
min2(Numeric op1,
Numeric op2,
PercentBaseContext context)
Return the smaller of the two Numerics. |
static Numeric |
modulo(Numeric op1,
Numeric op2)
Return the remainder of a division of the two operand Numeric. |
static Numeric |
modulo2(Numeric op1,
Numeric op2,
PercentBaseContext context)
Return the remainder of a division of the two operand Numeric. |
static Numeric |
multiply(Numeric op1,
Numeric op2)
Multiply the two operands and return a new Numeric representing the result. |
static Numeric |
multiply2(Numeric op1,
Numeric op2,
PercentBaseContext context)
Multiply the two operands with a percentage context and return a new Numeric representing the result. |
static Numeric |
negate(Numeric op)
Return the negation of a Numeric. |
static Numeric |
negate2(Numeric op,
PercentBaseContext context)
Return the negation of a Numeric. |
static Numeric |
subtraction(Numeric op1,
Numeric op2)
Add the second operand from the first and return a new Numeric representing the result. |
static Numeric |
subtraction2(Numeric op1,
Numeric op2,
PercentBaseContext context)
Subtract the two operands with a percentage context and return a new Numeric representing the result. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static Numeric addition(Numeric op1, Numeric op2) throws PropertyException
op1
- The first operand.op2
- The second operand.
PropertyException
- If the dimension of the operand is different
from the dimension of this Numeric.public static Numeric addition2(Numeric op1, Numeric op2, PercentBaseContext context) throws PropertyException
op1
- The first operand.op2
- The second operand.context
- a percent base context
PropertyException
- If the dimension of the operand is different
from the dimension of this Numeric.public static Numeric subtraction(Numeric op1, Numeric op2) throws PropertyException
op1
- The first operand.op2
- The second operand.
PropertyException
- If the dimension of the operand is different
from the dimension of this Numeric.public static Numeric subtraction2(Numeric op1, Numeric op2, PercentBaseContext context) throws PropertyException
op1
- The first operand.op2
- The second operand.context
- a percent base context
PropertyException
- If the dimension of the operand is different
from the dimension of this Numeric.public static Numeric multiply(Numeric op1, Numeric op2) throws PropertyException
op1
- The first operand.op2
- The second operand.
PropertyException
- If the dimension of the operand is different
from the dimension of this Numeric.public static Numeric multiply2(Numeric op1, Numeric op2, PercentBaseContext context) throws PropertyException
op1
- The first operand.op2
- The second operand.context
- a percent base context
PropertyException
- If the dimension of the operand is different
from the dimension of this Numeric.public static Numeric divide(Numeric op1, Numeric op2) throws PropertyException
op1
- The first operand.op2
- The second operand.
PropertyException
- If the dimension of the operand is different
from the dimension of this Numeric.public static Numeric divide2(Numeric op1, Numeric op2, PercentBaseContext context) throws PropertyException
op1
- The first operand.op2
- The second operand.context
- a percent base context
PropertyException
- If the dimension of the operand is different
from the dimension of this Numeric.public static Numeric modulo(Numeric op1, Numeric op2) throws PropertyException
op1
- The first operand.op2
- The second operand.
PropertyException
- if a property exception occurspublic static Numeric modulo2(Numeric op1, Numeric op2, PercentBaseContext context) throws PropertyException
op1
- The first operand.op2
- The second operand.context
- a percent base context
PropertyException
- If the dimension of the operand is different
from the dimension of this Numeric.public static Numeric abs(Numeric op) throws PropertyException
op
- the operand.
PropertyException
- if a property exception occurspublic static Numeric abs2(Numeric op, PercentBaseContext context) throws PropertyException
op
- the operand.context
- a percent base context
PropertyException
- If the dimension of the operand is different
from the dimension of this Numeric.public static Numeric negate(Numeric op) throws PropertyException
op
- the operand.
PropertyException
- if a property exception occurspublic static Numeric negate2(Numeric op, PercentBaseContext context) throws PropertyException
op
- the operand.context
- a percent base context
PropertyException
- If the dimension of the operand is different
from the dimension of this Numeric.public static Numeric max(Numeric op1, Numeric op2) throws PropertyException
op1
- The first operand.op2
- The second operand.
PropertyException
- if the dimensions or value types of the operands are different.public static Numeric max2(Numeric op1, Numeric op2, PercentBaseContext context) throws PropertyException
op1
- The first operand.op2
- The second operand.context
- a percent base context
PropertyException
- If the dimension of the operand is different
from the dimension of this Numeric.public static Numeric min(Numeric op1, Numeric op2) throws PropertyException
op1
- The first operand.op2
- The second operand.
PropertyException
- if the dimensions or value types of the operands are different.public static Numeric min2(Numeric op1, Numeric op2, PercentBaseContext context) throws PropertyException
op1
- The first operand.op2
- The second operand.context
- a percent base context
PropertyException
- If the dimension of the operand is different
from the dimension of this Numeric.
|
fop 2.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |