Package com.sun.msv.datatype.xsd
Class IntegerValueType
- java.lang.Object
-
- java.lang.Number
-
- com.sun.msv.datatype.xsd.IntegerValueType
-
- All Implemented Interfaces:
Serializable,Comparable
public class IntegerValueType extends Number implements Comparable, Serializable
Value object of "integer" type.- Author:
- Kohsuke KAWAGUCHI
- See Also:
- Serialized Form
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompareTo(Object o)static IntegerValueTypecreate(String nonCanonicalizedValue)translates non-canonicalized representation of an integer into an IntegerValueType.static IntegerValueTypecreate(BigInteger bi)translates a BigInteger to an IntegerValueType.doubledoubleValue()booleanequals(Object o)floatfloatValue()inthashCode()intintValue()booleanisNegative()returns true if the value if negative (less than zero)booleanisNonNegative()returns true if the value if non-negative (greater than or equal to zero)booleanisNonPositive()returns true if the value if non-positive (less than or equal to zero)booleanisPositive()returns true if the value if positive (greater than zero)longlongValue()intprecision()BigIntegertoBigInteger()converts to BigInteger.StringtoString()-
Methods inherited from class java.lang.Number
byteValue, shortValue
-
-
-
-
Method Detail
-
create
public static IntegerValueType create(BigInteger bi)
translates a BigInteger to an IntegerValueType.
-
create
public static IntegerValueType create(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(Object o)
- Specified by:
compareToin interfaceComparable- Returns:
- 1 if this value is bigger than rhs 0 if the values are the same -1 if rhs is bigger than this.
-
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 BigInteger toBigInteger()
converts to BigInteger.
-
doubleValue
public double doubleValue()
- Specified by:
doubleValuein classNumber
-
floatValue
public float floatValue()
- Specified by:
floatValuein classNumber
-
-