de.fraunhofer.ipsi.xpathDatatypes
Class XS_Decimal

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_Decimal
All Implemented Interfaces:
Numeric, java.lang.Comparable<Numeric>
Direct Known Subclasses:
XS_Integer

public class XS_Decimal
extends XDT_AnyAtomicType
implements Numeric


Constructor Summary
XS_Decimal(java.math.BigDecimal value)
          Constructor
XS_Decimal(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 divide
 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
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

XS_Decimal

public XS_Decimal(java.math.BigDecimal value)
Constructor

Parameters:
value - a BigDecimal

XS_Decimal

public XS_Decimal(java.lang.String value)
Constructor

Parameters:
value - a String
Method Detail

compareTo

public int compareTo(Numeric num)
Method compareTo

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

toString

public java.lang.String toString()
Method toString

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

doubleValue

public double doubleValue()
Method doubleValue

Returns:
a double

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

idivide

public Numeric idivide(Numeric b)
Method divide

Specified by:
idivide 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

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

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

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

equals

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

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