fop 1.0

org.apache.fop.fo.expr
Class AbsFunction

java.lang.Object
  extended by org.apache.fop.fo.expr.FunctionBase
      extended by org.apache.fop.fo.expr.AbsFunction
All Implemented Interfaces:
Function

public class AbsFunction
extends FunctionBase

Class modelling the abs Number Function. See Sec. 5.10.1 of the XSL-FO spec.


Constructor Summary
AbsFunction()
           
 
Method Summary
 Property eval(Property[] args, PropertyInfo propInfo)
          Evaluate the function
 int nbArgs()
           
 
Methods inherited from class org.apache.fop.fo.expr.FunctionBase
getPercentBase, padArgsWithPropertyName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbsFunction

public AbsFunction()
Method Detail

nbArgs

public int nbArgs()
Returns:
1 (the number of arguments required for the abs function)

eval

public Property eval(Property[] args,
                     PropertyInfo propInfo)
              throws PropertyException
Description copied from interface: Function
Evaluate the function

Parameters:
args - array of arguments to be evaluated, the first of which should be a numeric value
propInfo - the PropertyInfo object to be evaluated
Returns:
the absolute value of the input
Throws:
PropertyException - for non-numeric input

fop 1.0

Copyright 1999-2010 The Apache Software Foundation. All Rights Reserved.