Class BigTimeDurationValueType
- java.lang.Object
-
- com.sun.msv.datatype.xsd.datetime.BigTimeDurationValueType
-
- All Implemented Interfaces:
ITimeDurationValueType,Serializable
public class BigTimeDurationValueType extends Object implements ITimeDurationValueType
ITimeDurationValueType implementation that can hold all lexically legal timeDuration value.- Author:
- Kohsuke KAWAGUCHI
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected BigIntegerdayprotected BigIntegerhourprotected BigIntegerminuteprotected BigIntegermonthprotected BigDecimalsecondprotected intsignumprotected BigIntegeryear
-
Constructor Summary
Constructors Constructor Description 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(String lexicalRepresentation)Reads in the lexical duration format.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompare(ITimeDurationValueType o)compare two ITimeDurationValueType as defined in com.sun.msv.datatype/Comparatorbooleanequals(ITimeDurationValueType o)booleanequals(Object o)static BigTimeDurationValueTypefromMinutes(int minutes)static BigTimeDurationValueTypefromMinutes(BigInteger minutes)BigTimeDurationValueTypegetBigValue()BigIntegergetDay()BigIntegergetHour()BigIntegergetMinute()BigIntegergetMonth()BigDecimalgetSecond()BigIntegergetYear()inthashCode()hash code has to be consistent with equals method.StringtoString()
-
-
-
Field Detail
-
signum
protected int signum
-
year
protected BigInteger year
-
month
protected BigInteger month
-
day
protected BigInteger day
-
hour
protected BigInteger hour
-
minute
protected BigInteger minute
-
second
protected BigDecimal second
-
-
Constructor Detail
-
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
public BigTimeDurationValueType(String lexicalRepresentation) throws IllegalArgumentException
Reads in the lexical duration format.- Parameters:
lexicalRepresentation- whitespace stripped lexical form.- Throws:
IllegalArgumentException
-
-
Method Detail
-
equals
public boolean equals(ITimeDurationValueType o)
-
hashCode
public int hashCode()
hash code has to be consistent with equals method.
-
compare
public int compare(ITimeDurationValueType o)
Description copied from interface:ITimeDurationValueTypecompare two ITimeDurationValueType as defined in com.sun.msv.datatype/Comparator- Specified by:
comparein interfaceITimeDurationValueType
-
getBigValue
public BigTimeDurationValueType getBigValue()
- Specified by:
getBigValuein interfaceITimeDurationValueType
-
fromMinutes
public static BigTimeDurationValueType fromMinutes(int minutes)
-
fromMinutes
public static BigTimeDurationValueType fromMinutes(BigInteger minutes)
-
getDay
public BigInteger getDay()
- Returns:
- non-null positive value. use
signumfor the sign.
-
getHour
public BigInteger getHour()
- Returns:
- non-null positive value. use
signumfor the sign.
-
getMinute
public BigInteger getMinute()
- Returns:
- non-null positive value. use
signumfor the sign.
-
getMonth
public BigInteger getMonth()
- Returns:
- non-null positive value. use
signumfor the sign.
-
getSecond
public BigDecimal getSecond()
- Returns:
- non-null positive value. use
signumfor the sign.
-
getYear
public BigInteger getYear()
- Returns:
- non-null positive value. use
signumfor the sign.
-
-