com.xml_project.morganaxproc.xdm
Class XS_Numeric

java.lang.Object
  extended by com.xml_project.morganaxproc.xdm.XdmSequence
      extended by com.xml_project.morganaxproc.xdm.XdmItem
          extended by com.xml_project.morganaxproc.xdm.XdmValue
              extended by com.xml_project.morganaxproc.xdm.XS_AnySimpleType
                  extended by com.xml_project.morganaxproc.xdm.XS_AnyAtomicType
                      extended by com.xml_project.morganaxproc.xdm.XS_Numeric
All Implemented Interfaces:
XS_AnyType, Iterable<XdmItem>
Direct Known Subclasses:
XS_Decimal, XS_Double, XS_Float, XS_Integer

public abstract class XS_Numeric
extends XS_AnyAtomicType

Abstract base class for all numeric values.


Nested Class Summary
static class XS_Numeric.Functions
          An enumeration of the function for numeric values.
static class XS_Numeric.Operations
          An enumeration of the operation for numeric values.
 
Nested classes/interfaces inherited from class com.xml_project.morganaxproc.xdm.XS_AnyAtomicType
XS_AnyAtomicType.ValueComparers
 
Field Summary
static QName TypeName
           
 
Constructor Summary
XS_Numeric()
           
 
Method Summary
abstract  XS_Numeric arithmetic(XS_Numeric.Operations op, XS_Numeric val)
           
abstract  int compareValues(XS_AnySimpleType val)
           
 int compareValues(XS_AnySimpleType val, com.xml_project.morganaxproc.xquery.configuration.Collation col, XS_dayTimeDuration implicitTimezone)
           
abstract  boolean effectiveBooleanValue()
           
abstract  XS_Numeric function(XS_Numeric.Functions func, int par)
           
static Class<? extends XS_Numeric> getPromotionClass(XdmSequence seq)
           
static Class<? extends XS_Numeric> getPromotionClass(XdmValue v1, XdmValue v2)
           
static Class<? extends XS_AnyType> getRestrictionBase()
           
 QName getTypeName()
           
abstract  boolean isNaN()
           
 boolean isOrdered()
           
static XS_Double makeDouble(XdmSequence seq)
           
static XS_Numeric makeOperand(XdmSequence seq, int pos, XS_Numeric.Operations theOp, Class<? extends XS_AnyType> theClass)
           
static XS_Numeric makeOperand(XdmSequence seq, int pos, XS_Numeric.Operations theOp, SequenceType targetClass)
           
static XS_Numeric[] makeOperands(XdmValue v1, XdmValue v2)
           
static XS_Numeric newInstance(XdmValue value)
           
static XS_Numeric promoteTo(XS_Numeric val, Class<? extends XS_AnyType> theClass)
           
 
Methods inherited from class com.xml_project.morganaxproc.xdm.XS_AnyAtomicType
compareValue, makeCompareResult, test
 
Methods inherited from class com.xml_project.morganaxproc.xdm.XS_AnySimpleType
compareValues, isValue
 
Methods inherited from class com.xml_project.morganaxproc.xdm.XdmValue
atomize
 
Methods inherited from class com.xml_project.morganaxproc.xdm.XdmItem
first, get, getStringValue, getValue, hasValues, isEmpty, iterator, size, subSequence
 
Methods inherited from class com.xml_project.morganaxproc.xdm.XdmSequence
concat, hasCommonType, normalize, serialize, wrap
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TypeName

public static final QName TypeName
Constructor Detail

XS_Numeric

public XS_Numeric()
Method Detail

effectiveBooleanValue

public abstract boolean effectiveBooleanValue()

compareValues

public abstract int compareValues(XS_AnySimpleType val)
                           throws XPathException
Throws:
XPathException

isNaN

public abstract boolean isNaN()

getTypeName

public QName getTypeName()

isOrdered

public boolean isOrdered()
Specified by:
isOrdered in class XS_AnyAtomicType

compareValues

public final int compareValues(XS_AnySimpleType val,
                               com.xml_project.morganaxproc.xquery.configuration.Collation col,
                               XS_dayTimeDuration implicitTimezone)
                        throws XPathException
Specified by:
compareValues in class XS_AnySimpleType
Throws:
XPathException

makeDouble

public static XS_Double makeDouble(XdmSequence seq)
                            throws XPathException
Throws:
XPathException

promoteTo

public static XS_Numeric promoteTo(XS_Numeric val,
                                   Class<? extends XS_AnyType> theClass)
                            throws XPathException
Throws:
XPathException

makeOperand

public static XS_Numeric makeOperand(XdmSequence seq,
                                     int pos,
                                     XS_Numeric.Operations theOp,
                                     SequenceType targetClass)
                              throws XPathException
Throws:
XPathException

makeOperand

public static XS_Numeric makeOperand(XdmSequence seq,
                                     int pos,
                                     XS_Numeric.Operations theOp,
                                     Class<? extends XS_AnyType> theClass)
                              throws XPathException
Throws:
XPathException

makeOperands

public static XS_Numeric[] makeOperands(XdmValue v1,
                                        XdmValue v2)
                                 throws XPathException
Throws:
XPathException

getPromotionClass

public static Class<? extends XS_Numeric> getPromotionClass(XdmSequence seq)
Parameters:
seq -
Returns:
Gets the common promotion class for this sequence. Returns null if one XdmItem is not an instance of XS_Numeric

getPromotionClass

public static Class<? extends XS_Numeric> getPromotionClass(XdmValue v1,
                                                            XdmValue v2)

arithmetic

public abstract XS_Numeric arithmetic(XS_Numeric.Operations op,
                                      XS_Numeric val)
                               throws XPathException
Throws:
XPathException

function

public abstract XS_Numeric function(XS_Numeric.Functions func,
                                    int par)
                             throws XPathException
Throws:
XPathException

getRestrictionBase

public static Class<? extends XS_AnyType> getRestrictionBase()

newInstance

public static XS_Numeric newInstance(XdmValue value)
                              throws XPathException
Throws:
XPathException