com.sun.msv.datatype.xsd
Class IntegerValueType

java.lang.Object
  extended by java.lang.Number
      extended by com.sun.msv.datatype.xsd.IntegerValueType
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable

public class IntegerValueType
extends java.lang.Number
implements java.lang.Comparable, java.io.Serializable

Value object of "integer" type.

Author:
Kohsuke KAWAGUCHI
See Also:
Serialized Form

Method Summary
 int compareTo(java.lang.Object o)
           
static IntegerValueType create(java.math.BigInteger bi)
          translates a BigInteger to an IntegerValueType.
static IntegerValueType create(java.lang.String nonCanonicalizedValue)
          translates non-canonicalized representation of an integer into an IntegerValueType.
 double doubleValue()
           
 boolean equals(java.lang.Object o)
           
 float floatValue()
           
 int hashCode()
           
 int intValue()
           
 boolean isNegative()
          returns true if the value if negative (less than zero)
 boolean isNonNegative()
          returns true if the value if non-negative (greater than or equal to zero)
 boolean isNonPositive()
          returns true if the value if non-positive (less than or equal to zero)
 boolean isPositive()
          returns true if the value if positive (greater than zero)
 long longValue()
           
 int precision()
           
 java.math.BigInteger toBigInteger()
          converts to BigInteger.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Number
byteValue, shortValue
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

create

public static IntegerValueType create(java.math.BigInteger bi)
translates a BigInteger to an IntegerValueType.


create

public static IntegerValueType create(java.lang.String nonCanonicalizedValue)
translates non-canonicalized representation of an integer into an IntegerValueType.

Returns:
null when the parameter is not even valid with respect to the lexical space of "integer" type specified in XML Schema datatype spec.

compareTo

public int compareTo(java.lang.Object o)
Specified by:
compareTo in interface java.lang.Comparable
Returns:
1 if this value is bigger than rhs 0 if the values are the same -1 if rhs is bigger than this.

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

precision

public int precision()

isNonPositive

public boolean isNonPositive()
returns true if the value if non-positive (less than or equal to zero)


isPositive

public boolean isPositive()
returns true if the value if positive (greater than zero)


isNegative

public boolean isNegative()
returns true if the value if negative (less than zero)


isNonNegative

public boolean isNonNegative()
returns true if the value if non-negative (greater than or equal to zero)


toBigInteger

public java.math.BigInteger toBigInteger()
converts to BigInteger.


doubleValue

public double doubleValue()
Specified by:
doubleValue in class java.lang.Number

floatValue

public float floatValue()
Specified by:
floatValue in class java.lang.Number

intValue

public int intValue()
Specified by:
intValue in class java.lang.Number

longValue

public long longValue()
Specified by:
longValue in class java.lang.Number