com.xml_project.morganaxdm
Class XS_Numeric

java.lang.Object
  extended by com.xml_project.morganaxdm.XdmSequence
      extended by com.xml_project.morganaxdm.XdmItem
          extended by com.xml_project.morganaxdm.XdmValue
              extended by com.xml_project.morganaxdm.XS_AnySimpleType
                  extended by com.xml_project.morganaxdm.XS_AnyAtomicType
                      extended by com.xml_project.morganaxdm.XS_Numeric
All Implemented Interfaces:
XS_AnyType, java.lang.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.morganaxdm.XS_AnyAtomicType
XS_AnyAtomicType.ValueComparers
 
Field Summary
static java.lang.String NaN_StringValue
           
static java.lang.String NegativeINF_StringValue
           
static java.lang.String PositiveINF_StringValue
           
static javax.xml.namespace.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.morganaxquery.configuration.Collation col, XS_dayTimeDuration implicitTimezone)
           
abstract  boolean effectiveBooleanValue()
           
abstract  XS_Numeric function(XS_Numeric.Functions func, int par)
           
static java.lang.Class<? extends XS_Numeric> getPromotionClass(XdmSequence seq)
           
static java.lang.Class<? extends XS_Numeric> getPromotionClass(XdmValue v1, XdmValue v2)
           
static java.lang.Class<? extends XS_AnyType> getRestrictionBase()
           
 javax.xml.namespace.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, java.lang.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, java.lang.Class<? extends XS_AnyType> theClass)
           
 
Methods inherited from class com.xml_project.morganaxdm.XS_AnyAtomicType
compareValue, makeCompareResult, test
 
Methods inherited from class com.xml_project.morganaxdm.XS_AnySimpleType
compareValues, isValue
 
Methods inherited from class com.xml_project.morganaxdm.XdmValue
atomize
 
Methods inherited from class com.xml_project.morganaxdm.XdmItem
first, get, getStringValue, getValue, hasValues, isEmpty, iterator, size, subSequence
 
Methods inherited from class com.xml_project.morganaxdm.XdmSequence
concat, hasCommonType, normalize, serialize, serialize, serialize, wrap
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NaN_StringValue

public static final java.lang.String NaN_StringValue
See Also:
Constant Field Values

PositiveINF_StringValue

public static final java.lang.String PositiveINF_StringValue
See Also:
Constant Field Values

NegativeINF_StringValue

public static final java.lang.String NegativeINF_StringValue
See Also:
Constant Field Values

TypeName

public static final javax.xml.namespace.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 javax.xml.namespace.QName getTypeName()

isOrdered

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

compareValues

public final int compareValues(XS_AnySimpleType val,
                               com.xml_project.morganaxquery.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,
                                   java.lang.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,
                                     java.lang.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 java.lang.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 java.lang.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 java.lang.Class<? extends XS_AnyType> getRestrictionBase()

newInstance

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