Saxon.Api

 

 

Saxon.Api

Class XdmExternalObjectValue


public class XdmExternalObjectValue
extends XdmItem

The class XdmExternalObjectValue represents an XDM item that wraps an external .NET object. As such, it is outside the scope of the W3C XDM specification (but permitted as an extension).

Constructor Summary

XdmExternalObjectValue (object o)

Constructor to create an XdmExternalObjectValue that wraps a supplied .NET object.

 

Method Summary

 bool Equals(XdmExternalObjectValue other)

Compare two external objects for equality. Two instances of XdmExternalObjectValue are equal if the .NET objects that they wrap are equal.

 object GetExternalObject()

Get the wrapped .NET object.

 int GetHashCode()

Return a hash code for the object. This respects the semantics of equals(Object).

 bool IsAtomic()

Determine whether the item is an atomic value.

 string ToString()

Get the result of converting the external value to a string.

 

Constructor Detail

XdmExternalObjectValue

public XdmExternalObjectValue(object o)

Constructor to create an XdmExternalObjectValue that wraps a supplied .NET object.

Parameters:

o - The supplied .NET object.

Method Detail

Equals

public bool Equals(XdmExternalObjectValue other)

Compare two external objects for equality. Two instances of XdmExternalObjectValue are equal if the .NET objects that they wrap are equal.

Parameters:

other - The object to be compared

Returns:

True if the other object is an XdmExternalObjectValue and the two wrapped objects are equal under the equals method.

GetExternalObject

public object GetExternalObject()

Get the wrapped .NET object.

Returns:

The wrapped object.

GetHashCode

public override int GetHashCode()

Return a hash code for the object. This respects the semantics of equals(Object).

Returns:

A suitable hash code.

IsAtomic

public override bool IsAtomic()

Determine whether the item is an atomic value.

Returns:

False (the item is not an atomic value).

ToString

public override string ToString()

Get the result of converting the external value to a string.

Returns:

The result of applying ToString() to the wrapped external object.