com.icl.saxon.functions
Class FormatNumber
public class FormatNumber
containsReferences , display , enumerate , evaluate , evaluateAsBoolean , evaluateAsNodeSet , evaluateAsNumber , evaluateAsString , getDataType , getDependencies , getStaticContext , indent , isContextDocumentNodeSet , make , outputStringValue , reduce , setStaticContext , simplify , usesCurrent |
evaluateAsString
public String evaluateAsString(Context context)
throws XPathException
Evaluate in a context where a string is wanted
- evaluateAsString in interface Expression
formatNumber
public String formatNumber(double n,
String format,
DecimalFormatSymbols dfs)
throws XPathException
Here is the method that does the work. It needs to be synchronized because
it remembers information from one invocation to the next; it doesn't matter
if these are in different threads but it can't be interrupted. The reason for
remembering information is that getting a new DecimalFormatSymbols each time
is incredibly expensive, especially with the Microsoft Java VM. Actually
the synchronization is unnecessary if there is a bound Controller.
getDataType
public int getDataType()
Determine the data type of the exprEssion
- getDataType in interface Expression
- Value.STRING
getDependencies
public int getDependencies()
Determine the dependencies
- getDependencies in interface Expression
getName
public String getName()
- getName in interface Function