com.novell.xml.xpath
Class FunctionCall.NumberCaster
java.lang.Object
com.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)
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 |
caster
protected FunctionCall.DoubleCaster caster
- The casting object
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.)
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