de.fraunhofer.ipsi.xpathDatatypes
Class XS_Double

java.lang.Object
  extended by de.fraunhofer.ipsi.xpathDatatypes.XS_AnySimpleType
      extended by de.fraunhofer.ipsi.xpathDatatypes.XDT_AnyAtomicType
          extended by de.fraunhofer.ipsi.xpathDatatypes.XS_Double
All Implemented Interfaces:
Numeric, java.lang.Comparable<Numeric>

public class XS_Double
extends XDT_AnyAtomicType
implements Numeric


Field Summary
static XS_Double NaN
           
 
Constructor Summary
XS_Double(double value)
          Constructor
XS_Double(java.lang.String value)
          Constructor
 
Method Summary
 Numeric abs()
          Method abs
 Numeric add(Numeric b)
          Method add
<T extends XDT_AnyAtomicType>
T
castas(java.lang.Class<T> type)
          Method castas
 Numeric ceiling()
          Method ceiling
 int compareTo(Numeric num)
          Method compareTo
 Numeric divide(Numeric b)
          Method divide
 double doubleValue()
          Method doubleValue
 boolean equals(java.lang.Object o)
          Method equals
 Numeric floor()
          Method floor
 Numeric idivide(Numeric b)
          Method idivide
 Numeric mod(Numeric b)
          Method mod
 Numeric multiply(Numeric b)
          Method multiply
 Numeric negate()
          Method negate
 Numeric round()
          Method round
 Numeric roundHalfToEven(int n)
          Method roundHalfEven
 Numeric subtract(Numeric b)
          Method subtract
 java.lang.String toString()
          Method toString
static XS_Double valueOf(XDT_AnyAtomicType d)
          Method valueOf
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

NaN

public static final XS_Double NaN
Constructor Detail

XS_Double

public XS_Double(double value)
Constructor

Parameters:
value - a double

XS_Double

public XS_Double(java.lang.String value)
Constructor

Parameters:
value - a String
Method Detail

doubleValue

public double doubleValue()
Method doubleValue

Returns:
a double

compareTo

public int compareTo(Numeric num)
Method compareTo

Specified by:
compareTo in interface java.lang.Comparable<Numeric>
Parameters:
o - an Object
Returns:
an int

add

public Numeric add(Numeric b)
Method add

Specified by:
add in interface Numeric
Parameters:
b - a Numeric
Returns:
a Numeric

subtract

public Numeric subtract(Numeric b)
Method subtract

Specified by:
subtract in interface Numeric
Parameters:
b - a Numeric
Returns:
a Numeric

multiply

public Numeric multiply(Numeric b)
Method multiply

Specified by:
multiply in interface Numeric
Parameters:
b - a Numeric
Returns:
a Numeric

divide

public Numeric divide(Numeric b)
Method divide

Specified by:
divide in interface Numeric
Parameters:
b - a Numeric
Returns:
a Numeric

idivide

public Numeric idivide(Numeric b)
Description copied from interface: Numeric
Method idivide

Specified by:
idivide in interface Numeric
Parameters:
b - a Numeric
Returns:
a Numeric

mod

public Numeric mod(Numeric b)
Method mod

Specified by:
mod in interface Numeric
Parameters:
b - a Numeric
Returns:
a Numeric

negate

public Numeric negate()
Method negate

Specified by:
negate in interface Numeric
Returns:
a Numeric

valueOf

public static XS_Double valueOf(XDT_AnyAtomicType d)
Method valueOf

Parameters:
d - a XS_AnySimpleType
Returns:
a XS_Double

castas

public <T extends XDT_AnyAtomicType> T castas(java.lang.Class<T> type)
                                   throws java.lang.ClassCastException,
                                          XPathDTException
Method castas

Overrides:
castas in class XDT_AnyAtomicType
Parameters:
type - a BuiltinSimpleType
Returns:
a XS_AnySimpleType
Throws:
CastError
java.lang.ClassCastException
XPathDTException

toString

public java.lang.String toString()
Method toString

Overrides:
toString in class java.lang.Object
Returns:
a String

equals

public boolean equals(java.lang.Object o)
Method equals

Overrides:
equals in class java.lang.Object
Parameters:
o - an Object
Returns:
a boolean

abs

public Numeric abs()
Method abs

Specified by:
abs in interface Numeric
Returns:
a Numeric

floor

public Numeric floor()
Method floor

Specified by:
floor in interface Numeric
Returns:
a Numeric

ceiling

public Numeric ceiling()
Method ceiling

Specified by:
ceiling in interface Numeric
Returns:
a Numeric

round

public Numeric round()
Method round

Specified by:
round in interface Numeric
Returns:
a Numeric

roundHalfToEven

public Numeric roundHalfToEven(int n)
Method roundHalfEven

Specified by:
roundHalfToEven in interface Numeric
Parameters:
n - an int
Returns:
a Numeric