FileDocCategorySizeDatePackage
Number.javaAPI DocJava SE 5 API1922Fri Aug 26 14:56:10 BST 2005com.sun.org.apache.xpath.internal.operations

Number

public class Number extends UnaryOperation
The 'number()' operation expression executer.

Fields Summary
Constructors Summary
Methods Summary
public doublenum(com.sun.org.apache.xpath.internal.XPathContext xctxt)
Evaluate this operation directly to a double.

param
xctxt The runtime execution context.
return
The result of the operation as a double.
throws
javax.xml.transform.TransformerException


    return m_right.num(xctxt);
  
public com.sun.org.apache.xpath.internal.objects.XObjectoperate(com.sun.org.apache.xpath.internal.objects.XObject right)
Apply the operation to two operands, and return the result.

param
right non-null reference to the evaluated right operand.
return
non-null reference to the XObject that represents the result of the operation.
throws
javax.xml.transform.TransformerException


    if (XObject.CLASS_NUMBER == right.getType())
      return right;
    else
      return new XNumber(right.num());