| |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Represents a "numeric" value as defined by the XSL FO Specification. This consists of one or more kinds of value specifications, from absolute numbers (units power of 0) to lengths (unit power of 1), relative lengths (ems), percentage lengths. A Numeric can be constructed from other Property types representing Numbers or Length-type values. Numeric provides methods to return Number and Length values based on its current value. It supports basic arithmetic operations involving Numerics.
Field Summary | |
final static int | ABS_LENGTH |
final static int | PC_LENGTH |
final static int | TCOL_LENGTH |
Constructor Summary | |
Numeric(Number num) Construct a Numeric object from a Number. | |
Numeric(Length l) Construct a Numeric object from a Length. | |
Numeric(PercentLength pclen) Construct a Numeric object from a PercentLength. | |
Numeric(TableColLength tclen) Construct a Numeric object from a TableColLength. |
Method Summary | |
Numeric | abs() Return the absolute value of this Numeric. |
Numeric | add(Numeric op) Add the operand from the current value and return a new Numeric representing the result. |
Double | asDouble() |
Length | asLength() Return the current value as a Length if possible. |
Number | asNumber() Return the current value as a Number if possible. |
Numeric | divide(Numeric op) Divide the the current value by the operand and return a new Numeric representing the result. |
Numeric | max(Numeric op) Return a Numeric which is the maximum of the current value and the operand. |
Numeric | min(Numeric op) Return a Numeric which is the minimum of the current value and the operand. |
Numeric | multiply(Numeric op) Multiply the the current value by the operand and return a new Numeric representing the result. |
Numeric | subtract(Numeric op) Subtract the operand from the current value and return a new Numeric representing the result. |
Field Detail |
public final static int ABS_LENGTH
public final static int PC_LENGTH
public final static int TCOL_LENGTH
Constructor Detail |
public Numeric(Number num)
public Numeric(Length l)
public Numeric(PercentLength pclen)
public Numeric(TableColLength tclen)
Method Detail |
public Numeric abs()
public Numeric add(Numeric op)
throws PropertyException
public Double asDouble()
public Length asLength()
public Number asNumber()
public Numeric divide(Numeric op)
throws PropertyException
public Numeric max(Numeric op)
throws PropertyException
public Numeric min(Numeric op)
throws PropertyException
public Numeric multiply(Numeric op)
throws PropertyException
public Numeric subtract(Numeric op)
throws PropertyException
Association Links |
| |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |