com.icl.saxon.expr

Class ObjectValue

public class ObjectValue extends Value

An XPath value that encapsulates a Java object. Such a value can only be obtained by calling an extension function that returns it.
Constructor Summary
ObjectValue(Object object)
Constructor
Method Summary
booleanasBoolean()
Convert the value to a boolean
doubleasNumber()
Get the value as a number
StringasString()
Get the value as a String
intconversionPreference(Class required)
Get conversion preference for this value to a Java class.
ObjectconvertToJava(Class target)
Convert to Java object (for passing to external functions)
voiddisplay(int level)
Diagnostic print of expression structure
booleanequals(ObjectValue other)
Determine if two ObjectValues are equal
intgetDataType()
Determine the data type of the expression
ObjectgetObject()
Get the encapsulated object

Constructor Detail

ObjectValue

public ObjectValue(Object object)
Constructor

UNKNOWN: the object to be encapsulated

Method Detail

asBoolean

public boolean asBoolean()
Convert the value to a boolean

Returns: the boolean value

asNumber

public double asNumber()
Get the value as a number

Returns: the numeric value

asString

public String asString()
Get the value as a String

Returns: a String representation of the value

conversionPreference

public int conversionPreference(Class required)
Get conversion preference for this value to a Java class. A low result indicates higher preference.

convertToJava

public Object convertToJava(Class target)
Convert to Java object (for passing to external functions)

display

public void display(int level)
Diagnostic print of expression structure

equals

public boolean equals(ObjectValue other)
Determine if two ObjectValues are equal

getDataType

public int getDataType()
Determine the data type of the expression

Returns: Value.OBJECT

getObject

public Object getObject()
Get the encapsulated object