FileDocCategorySizeDatePackage
Bool.javaAPI DocJava SE 6 API2018Tue Jun 10 00:23:16 BST 2008com.sun.org.apache.xpath.internal.operations

Bool

public class Bool extends UnaryOperation
The 'boolean()' operation expression executer.

Fields Summary
static final long
serialVersionUID
Constructors Summary
Methods Summary
public booleanbool(com.sun.org.apache.xpath.internal.XPathContext xctxt)
Evaluate this operation directly to a boolean.

param
xctxt The runtime execution context.
return
The result of the operation as a boolean.
throws
javax.xml.transform.TransformerException

    return m_right.bool(xctxt);
  
public com.sun.org.apache.xpath.internal.objects.XObjectoperate(com.sun.org.apache.xpath.internal.objects.XObject right)
Apply the operation to two operands, and return the result.

param
right non-null reference to the evaluated right operand.
return
non-null reference to the XObject that represents the result of the operation.
throws
javax.xml.transform.TransformerException


                                       
       
  

    if (XObject.CLASS_BOOLEAN == right.getType())
      return right;
    else
      return right.bool() ? XBoolean.S_TRUE : XBoolean.S_FALSE;