com.novell.xml.xpath
Class FunctionCall.NumberCaster

java.lang.Object
  extended bycom.novell.xml.xpath.FunctionCall.NumberCaster
All Implemented Interfaces:
FunctionCall.DoubleCaster
Enclosing class:
FunctionCall

protected static class FunctionCall.NumberCaster
extends Object
implements FunctionCall.DoubleCaster

An implementation class for casting an XPath number value to a java Number-derived object (especially a java primitive number type)


Field Summary
protected  FunctionCall.DoubleCaster caster
          The casting object
 
Constructor Summary
FunctionCall.NumberCaster(Class formalType)
          Construct a NumberCaster for the passed object type
 
Method Summary
 Number cast(double value)
          Cast an XSLT number value to a java type
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

caster

protected FunctionCall.DoubleCaster caster
The casting object

Constructor Detail

FunctionCall.NumberCaster

public FunctionCall.NumberCaster(Class formalType)
                          throws IllegalArgumentException
Construct a NumberCaster for the passed object type

Parameters:
formalType - A Class object representing the Number-derived type (java.lang.Integer, etc.)
Method Detail

cast

public Number cast(double value)
Cast an XSLT number value to a java type

Specified by:
cast in interface FunctionCall.DoubleCaster
Parameters:
value - The value to cast
Returns:
An object of the appropriate type for the cast