org.planx.xpath.object
Class XBoolean

java.lang.Object
  extended by org.planx.xpath.expr.Expression
      extended by org.planx.xpath.object.XObject
          extended by org.planx.xpath.object.XSimple
              extended by org.planx.xpath.object.XBoolean

public class XBoolean
extends XSimple

A boolean value returned by an XPath expression.


Field Summary
static XBoolean FALSE
           
static XBoolean TRUE
           
 
Constructor Summary
XBoolean(boolean value)
          Construct an XBoolean with the specified boolean value.
 
Method Summary
 boolean booleanValue()
          Returns the boolean value of this XBoolean.
 double doubleValue()
          Returns the double value of this XBoolean.
 boolean equals(Object o)
          Returns true if and only if o is an instance of XBoolean and it has the same boolean value as this.
 int hashCode()
          Returns a hash code value for this object.
 String stringValue()
          Returns the string "true" if this XBoolean represents the value true.
 String toString()
          Returns the string "true" if this XBoolean represents the value true.
 
Methods inherited from class org.planx.xpath.object.XObject
evaluate
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

FALSE

public static final XBoolean FALSE

TRUE

public static final XBoolean TRUE
Constructor Detail

XBoolean

public XBoolean(boolean value)
Construct an XBoolean with the specified boolean value.

Method Detail

booleanValue

public boolean booleanValue()
Returns the boolean value of this XBoolean.

Specified by:
booleanValue in class XObject

doubleValue

public double doubleValue()
Returns the double value of this XBoolean. true is converted to 1 and false is converted to 0.

Specified by:
doubleValue in class XSimple

stringValue

public String stringValue()
Returns the string "true" if this XBoolean represents the value true. Otherwise returns the string "false".

Specified by:
stringValue in class XSimple

toString

public String toString()
Returns the string "true" if this XBoolean represents the value true. Otherwise returns the string "false".

Overrides:
toString in class Object

equals

public boolean equals(Object o)
Returns true if and only if o is an instance of XBoolean and it has the same boolean value as this.

Overrides:
equals in class Object

hashCode

public int hashCode()
Returns a hash code value for this object.

Overrides:
hashCode in class Object


Copyright © 2010. All Rights Reserved.