de.fraunhofer.ipsi.xpathDatatypes
Class XS_Integer

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
              extended by de.fraunhofer.ipsi.xpathDatatypes.XS_Integer
All Implemented Interfaces:
Numeric, java.lang.Comparable<Numeric>
Direct Known Subclasses:
XS_Long, XS_NonNegativeInteger, XS_NonPositiveInteger

public class XS_Integer
extends XS_Decimal


Constructor Summary
XS_Integer(java.math.BigInteger value)
          Constructor
XS_Integer(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 floor()
          Method floor
 long longValue()
          Method longValue
 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 de.fraunhofer.ipsi.xpathDatatypes.XS_Decimal
divide, doubleValue, equals, idivide
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

XS_Integer

public XS_Integer(java.math.BigInteger value)
Constructor

Parameters:
value - a BigInteger

XS_Integer

public XS_Integer(java.lang.String value)
Constructor

Parameters:
value - a String
Method Detail

longValue

public long longValue()
Method longValue

Returns:
a long

compareTo

public int compareTo(Numeric num)
Method compareTo

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

toString

public java.lang.String toString()
Method toString

Overrides:
toString in class XS_Decimal
Returns:
a String

add

public Numeric add(Numeric b)
Method add

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

subtract

public Numeric subtract(Numeric b)
Method subtract

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

multiply

public Numeric multiply(Numeric b)
Method multiply

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

mod

public Numeric mod(Numeric b)
Method mod

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

negate

public Numeric negate()
Method negate

Specified by:
negate in interface Numeric
Overrides:
negate in class XS_Decimal
Returns:
a Numeric

abs

public Numeric abs()
Method abs

Specified by:
abs in interface Numeric
Overrides:
abs in class XS_Decimal
Returns:
a Numeric

floor

public Numeric floor()
Method floor

Specified by:
floor in interface Numeric
Overrides:
floor in class XS_Decimal
Returns:
a Numeric

ceiling

public Numeric ceiling()
Method ceiling

Specified by:
ceiling in interface Numeric
Overrides:
ceiling in class XS_Decimal
Returns:
a Numeric

round

public Numeric round()
Method round

Specified by:
round in interface Numeric
Overrides:
round in class XS_Decimal
Returns:
a Numeric

roundHalfToEven

public Numeric roundHalfToEven(int n)
Method roundHalfEven

Specified by:
roundHalfToEven in interface Numeric
Overrides:
roundHalfToEven in class XS_Decimal
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 XS_Decimal
Parameters:
type - a BuiltinSimpleType
Returns:
a XS_AnySimpleType
Throws:
CastError
java.lang.ClassCastException
XPathDTException