org.inria.ns.reflex.xml.operator
Class BooleanOperator

java.lang.Object
  extended by org.inria.ns.reflex.xml.operator.AbstractXOperator
      extended by org.inria.ns.reflex.xml.operator.DefaultXOperator
          extended by org.inria.ns.reflex.xml.operator.BooleanOperator
All Implemented Interfaces:
XOperator

public class BooleanOperator
extends DefaultXOperator
implements XOperator

XML operations on booleans.

Only the static methods of this class are usable directly. To use the methods of the singleton, use the master operator that ensure the type of the arguments.

Author:
Philippe Poulard
See Also:
Boolean, XMaster

Method Summary
 boolean booleanValueOf(Object referent)
          This implementation returns the boolean value of the referent based on its string value.
 short getNodeType(Object referent)
          The referent behave like an XML text node.
 Number numberValueOf(Object referent)
          This implementation returns the number value of the referent based on its string value.
static void register(XMaster xmaster)
          Registers this operator to the master operator.
 
Methods inherited from class org.inria.ns.reflex.xml.operator.DefaultXOperator
getAttributes, getChildren, getTypeName
 
Methods inherited from class org.inria.ns.reflex.xml.operator.AbstractXOperator
append, append, clear, clear, clearAll, clearAll, clone, clone, getAttributeValue, getCommentAt, getElementAt, getElementById, getElementsByName, getFamilyIndex, getFamilySize, getIndex, getNamedElementAt, getNamedProcessingInstructionAt, getNameIndex, getNameSize, getNamespaces, getNext, getNodeAt, getNodeKind, getParent, getPrevious, getProcessingInstructionAt, getQName, getRoot, getSize, getStringAttributeValue, getStringName, getTextAt, getType, getTypeIndex, getTypeSize, getValue, getXFactory, getXMLType, getXOperator, insertAfter, insertAfter, insertBefore, insertBefore, isAttribute, isComment, isDocument, isElement, isParentNode, isProcessingInstruction, isText, remove, remove, removeAttribute, rename, rename, replace, replace, setAttribute, stringValueOf, update, update, valueOf
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.inria.ns.reflex.xml.operator.XOperator
append, append, clear, clear, clearAll, clearAll, clone, clone, getAttributes, getAttributeValue, getChildren, getCommentAt, getElementAt, getElementById, getElementsByName, getFamilyIndex, getFamilySize, getIndex, getNamedElementAt, getNamedProcessingInstructionAt, getNameIndex, getNameSize, getNamespaces, getNext, getNodeAt, getNodeKind, getParent, getPrevious, getProcessingInstructionAt, getQName, getRoot, getSize, getStringAttributeValue, getStringName, getTextAt, getType, getTypeIndex, getTypeName, getTypeSize, getValue, getXFactory, getXMLType, insertAfter, insertAfter, insertBefore, insertBefore, isAttribute, isComment, isDocument, isElement, isParentNode, isProcessingInstruction, isText, remove, remove, removeAttribute, rename, rename, replace, replace, setAttribute, stringValueOf, update, update, valueOf
 

Method Detail

register

public static void register(XMaster xmaster)
Registers this operator to the master operator.

Parameters:
xmaster - The master operator.

numberValueOf

public Number numberValueOf(Object referent)
Description copied from class: AbstractXOperator
This implementation returns the number value of the referent based on its string value. May return an arbitrary-precision signed decimal number.

Specified by:
numberValueOf in interface XOperator
Overrides:
numberValueOf in class AbstractXOperator
Parameters:
referent - The referent.
Returns:
Its number value.
See Also:
AbstractXOperator.stringValueOf(Object), NumberOperator.parseNumber(String)

booleanValueOf

public boolean booleanValueOf(Object referent)
Description copied from class: AbstractXOperator
This implementation returns the boolean value of the referent based on its string value.

Specified by:
booleanValueOf in interface XOperator
Overrides:
booleanValueOf in class AbstractXOperator
Parameters:
referent - The referent.
Returns:
Its boolean value.
See Also:
AbstractXOperator.stringValueOf(Object)

getNodeType

public short getNodeType(Object referent)
The referent behave like an XML text node.

Specified by:
getNodeType in interface XOperator
Overrides:
getNodeType in class DefaultXOperator
Parameters:
referent - The referent object.
Returns:
This implementation returns the text-node-type.
See Also:
XType.TEXT_NODE