APIdia Launch Partner
Top Description Fields Constructors Methods
com.sun.org.apache.xpath.internal.objects

public Class XBoolean

extends XObject
Class Inheritance
Known Direct Subclasses
com.sun.org.apache.xpath.internal.objects.XBooleanStatic

This class represents an XPath boolean object, and is capable of converting the boolean to other types, such as a string.

Field Summary

Modifier and TypeField and Description
private final boolean
m_val

Value of the object.

public static final XBoolean
S_FALSE

A true boolean object so we don't have to keep creating them.

public static final XBoolean
S_TRUE

A true boolean object so we don't have to keep creating them.

pack-priv static final long
Inherited from com.sun.org.apache.xpath.internal.objects.XObject:
CLASS_BOOLEANCLASS_NODESETCLASS_NULLCLASS_NUMBERCLASS_RTREEFRAGCLASS_STRINGCLASS_UNKNOWNCLASS_UNRESOLVEDVARIABLEm_obj

Constructor Summary

AccessConstructor and Description
public
XBoolean(boolean
Value of the boolean object
b
)

Construct a XBoolean object.

public
XBoolean(Boolean
Value of the boolean object
b
)

Construct a XBoolean object.

Method Summary

Modifier and TypeMethod and Description
public boolean

Returns:

The object value as a boolean
bool
()

Overrides com.sun.org.apache.xpath.internal.objects.XObject.bool.

Cast result object to a boolean.

public boolean

Returns:

True if the two objects are equal
equals
(XObject
Object to compare to this
obj2
)

Overrides com.sun.org.apache.xpath.internal.objects.XObject.equals.

Tell if two objects are functionally equal.

public int

Returns:

type of CLASS_BOOLEAN
getType
()

Overrides com.sun.org.apache.xpath.internal.objects.XObject.getType.

Tell that this is a CLASS_BOOLEAN.

public String

Returns:

type string "#BOOLEAN"
getTypeString
()

Overrides com.sun.org.apache.xpath.internal.objects.XObject.getTypeString.

Given a request type, return the equivalent string.

public double

Returns:

numeric value of the object value
num
()

Overrides com.sun.org.apache.xpath.internal.objects.XObject.num.

Cast result object to a number.

public Object

Returns:

The object's value as a java object
object
()

Overrides com.sun.org.apache.xpath.internal.objects.XObject.object.

Return a java object that's closest to the representation that should be handed to an extension.

public String

Returns:

The object's value as a string
str
()

Overrides com.sun.org.apache.xpath.internal.objects.XObject.str.

Cast result object to a string.

Inherited from com.sun.org.apache.xpath.internal.objects.XObject:
allowDetachToReleaseappendToFsbboolWithSideEffectscallVisitorscastToTypecreatecreatedeepEqualsdestructdetachdispatchCharactersEventserrorerrorexecutefixupVariablesgetFreshgreaterThangreaterThanOrEqualiterlessThanlessThanOrEqualmutableNodesetnodelistnodesetnotEqualsnumWithSideEffectsresetrtfrtfrtreertreesetObjecttoStringxstr

Field Detail

m_valback to summary
private final boolean m_val

Value of the object.

S_FALSEback to summary
public static final XBoolean S_FALSE

A true boolean object so we don't have to keep creating them.

S_TRUEback to summary
public static final XBoolean S_TRUE

A true boolean object so we don't have to keep creating them.

serialVersionUIDback to summary
pack-priv static final long serialVersionUID

Hides com.sun.org.apache.xpath.internal.objects.XObject.serialVersionUID.

Constructor Detail

XBooleanback to summary
public XBoolean(boolean b)

Construct a XBoolean object.

Parameters
b:boolean

Value of the boolean object

XBooleanback to summary
public XBoolean(Boolean b)

Construct a XBoolean object.

Parameters
b:Boolean

Value of the boolean object

Method Detail

boolback to summary
public boolean bool()

Overrides com.sun.org.apache.xpath.internal.objects.XObject.bool.

Cast result object to a boolean.

Returns:boolean

The object value as a boolean

equalsback to summary
public boolean equals(XObject obj2)

Overrides com.sun.org.apache.xpath.internal.objects.XObject.equals.

Tell if two objects are functionally equal.

Parameters
obj2:XObject

Object to compare to this

Returns:boolean

True if the two objects are equal

getTypeback to summary
public int getType()

Overrides com.sun.org.apache.xpath.internal.objects.XObject.getType.

Tell that this is a CLASS_BOOLEAN.

Returns:int

type of CLASS_BOOLEAN

getTypeStringback to summary
public String getTypeString()

Overrides com.sun.org.apache.xpath.internal.objects.XObject.getTypeString.

Given a request type, return the equivalent string. For diagnostic purposes.

Returns:String

type string "#BOOLEAN"

numback to summary
public double num()

Overrides com.sun.org.apache.xpath.internal.objects.XObject.num.

Cast result object to a number.

Returns:double

numeric value of the object value

objectback to summary
public Object object()

Overrides com.sun.org.apache.xpath.internal.objects.XObject.object.

Return a java object that's closest to the representation that should be handed to an extension.

Returns:Object

The object's value as a java object

strback to summary
public String str()

Overrides com.sun.org.apache.xpath.internal.objects.XObject.str.

Cast result object to a string.

Returns:String

The object's value as a string