Package com.sun.msv.datatype.xsd
Class IntegerValueType
- java.lang.Object
-
- java.lang.Number
-
- 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.SerializableValue object of "integer" type.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private static longserialVersionUIDprivate java.lang.Stringvaluecanonical representation of absolute value of integer BNF of canonical representation canonical_integer := "0" | nonzero nonzero := '-'? ["1"-"9"] ["0"-"9"]*
-
Constructor Summary
Constructors Modifier Constructor Description privateIntegerValueType(long v)privateIntegerValueType(java.lang.String canonicalizedValue)internal use only: construct object from canonicalized value
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompareTo(java.lang.Object o)static IntegerValueTypecreate(java.lang.String nonCanonicalizedValue)translates non-canonicalized representation of an integer into an IntegerValueType.static IntegerValueTypecreate(java.math.BigInteger bi)translates a BigInteger to an IntegerValueType.doubledoubleValue()booleanequals(java.lang.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()java.math.BigIntegertoBigInteger()converts to BigInteger.java.lang.StringtoString()
-
-
-
Field Detail
-
value
private final java.lang.String value
canonical representation of absolute value of integer BNF of canonical representation canonical_integer := "0" | nonzero nonzero := '-'? ["1"-"9"] ["0"-"9"]*
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
-
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:
compareToin interfacejava.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:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.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:
doubleValuein classjava.lang.Number
-
floatValue
public float floatValue()
- Specified by:
floatValuein classjava.lang.Number
-
intValue
public int intValue()
- Specified by:
intValuein classjava.lang.Number
-
longValue
public long longValue()
- Specified by:
longValuein classjava.lang.Number
-
-