Class BigTimeDurationValueType
java.lang.Object
com.sun.msv.datatype.xsd.datetime.BigTimeDurationValueType
- All Implemented Interfaces:
ITimeDurationValueType
,Serializable
ITimeDurationValueType implementation that can hold all lexically legal
timeDuration value.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected BigInteger
protected BigInteger
protected BigInteger
protected BigInteger
protected BigDecimal
private static final long
protected int
private static final BigDateTimeValueType[]
protected BigInteger
-
Constructor Summary
ConstructorsConstructorDescriptionBigTimeDurationValueType
(int signum, BigInteger year, BigInteger month, BigInteger day, BigInteger hour, BigInteger minute, BigDecimal second) All the fields should be positive and use the signum field to determine the sign.BigTimeDurationValueType
(String lexicalRepresentation) Reads in the lexical duration format. -
Method Summary
Modifier and TypeMethodDescriptionprivate static int
int
compare two ITimeDurationValueType as defined in com.sun.msv.datatype/Comparatorboolean
boolean
static BigTimeDurationValueType
fromMinutes
(int minutes) static BigTimeDurationValueType
fromMinutes
(BigInteger minutes) getDay()
getHour()
getMonth()
private int
private int
getYear()
int
hashCode()
hash code has to be consistent with equals method.private static boolean
isDigit
(char ch) private static boolean
isDigitOrPeriod
(char ch) private BigInteger
private static void
organizeParts
(String whole, String[] parts, int[] partsIndex, int len, String tokens) private static BigDecimal
parseBigDecimal
(String whole, String part, int index) private static BigInteger
parseBigInteger
(String whole, String part, int index) private static String
parsePiece
(String whole, int[] idx) private void
toString()
-
Field Details
-
signum
protected int signum -
year
-
month
-
day
-
hour
-
minute
-
second
-
testInstance
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
-
Constructor Details
-
BigTimeDurationValueType
public BigTimeDurationValueType(int signum, BigInteger year, BigInteger month, BigInteger day, BigInteger hour, BigInteger minute, BigDecimal second) All the fields should be positive and use the signum field to determine the sign. -
BigTimeDurationValueType
Reads in the lexical duration format.- Parameters:
lexicalRepresentation
- whitespace stripped lexical form.- Throws:
IllegalArgumentException
-
-
Method Details
-
equals
-
equals
-
toString
-
nullAsZero
-
hashCode
public int hashCode()hash code has to be consistent with equals method. -
compare
Description copied from interface:ITimeDurationValueType
compare two ITimeDurationValueType as defined in com.sun.msv.datatype/Comparator- Specified by:
compare
in interfaceITimeDurationValueType
-
compare
-
getBigValue
- Specified by:
getBigValue
in interfaceITimeDurationValueType
-
fromMinutes
-
fromMinutes
-
getDay
- Returns:
- non-null positive value. use
signum
for the sign.
-
getHour
- Returns:
- non-null positive value. use
signum
for the sign.
-
getMinute
- Returns:
- non-null positive value. use
signum
for the sign.
-
getMonth
- Returns:
- non-null positive value. use
signum
for the sign.
-
getSecond
- Returns:
- non-null positive value. use
signum
for the sign.
-
getYear
- Returns:
- non-null positive value. use
signum
for the sign.
-
getSignum
-
getSignum
-
isDigit
private static boolean isDigit(char ch) -
isDigitOrPeriod
private static boolean isDigitOrPeriod(char ch) -
parsePiece
- Throws:
IllegalArgumentException
-
organizeParts
private static void organizeParts(String whole, String[] parts, int[] partsIndex, int len, String tokens) throws IllegalArgumentException - Throws:
IllegalArgumentException
-
parseBigInteger
private static BigInteger parseBigInteger(String whole, String part, int index) throws IllegalArgumentException - Throws:
IllegalArgumentException
-
parseBigDecimal
private static BigDecimal parseBigDecimal(String whole, String part, int index) throws IllegalArgumentException - Throws:
IllegalArgumentException
-
readObject
- Throws:
IOException
ClassNotFoundException
-